diff options
Diffstat (limited to 'cmd/server')
-rw-r--r-- | cmd/server/main.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/server/main.go b/cmd/server/main.go index 0fa5fea..4ca39de 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -16,6 +16,7 @@ import ( "gorm.io/driver/sqlite" "gorm.io/gorm" + "git.sr.ht/~gabrielgio/img" "git.sr.ht/~gabrielgio/img/pkg/components/auth" "git.sr.ht/~gabrielgio/img/pkg/components/filesystem" "git.sr.ht/~gabrielgio/img/pkg/components/media" @@ -69,8 +70,7 @@ func main() { } r := router.New() - r.ServeFiles("/static/{filepath:*}", "./static") - r.NotFound = ext.NotFoundHTML + r.GET("/static/{filepath:*}", ext.FileServer(img.StaticFS, "static/")) authMiddleware := ext.NewAuthMiddleware(hexKey, logger.WithField("context", "auth")) logMiddleware := ext.NewLogMiddleare(logger.WithField("context", "http")) |