fix: strip /assets/ prefix on production assets requests
This commit is contained in:
2
main.go
2
main.go
@@ -30,7 +30,7 @@ func main() {
|
||||
ctx := context.Background()
|
||||
log := slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{}))
|
||||
|
||||
as := http.FileServerFS(assets.New())
|
||||
as := http.StripPrefix("/assets/", http.FileServerFS(assets.New()))
|
||||
if *dev {
|
||||
as = http.StripPrefix("/assets/", http.FileServerFS(assets.Dev("./assets")))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user