Put /downloads behind auth

This commit is contained in:
Carl Pearson
2024-09-07 06:07:58 -06:00
parent 767e382b90
commit 9ca89f5509

View File

@@ -93,7 +93,12 @@ func main() {
e.POST("/video/:id/cancel", videoCancelHandler, authMiddleware)
e.POST("/video/:id/restart", videoRestartHandler, authMiddleware)
e.POST("/video/:id/delete", videoDeleteHandler, authMiddleware)
e.Static("/downloads", getDownloadDir())
staticGroup := e.Group("/downloads")
staticGroup.Use(authMiddleware)
staticGroup.Static("/", getDownloadDir())
// e.Static("/downloads", getDownloadDir())
store.Options = &sessions.Options{
Path: "/",