🐛 Bug fixes

This commit is contained in:
LittleSheep 2024-01-30 19:21:03 +08:00
parent e55077c7e9
commit 28fd5aca8b
2 changed files with 9 additions and 11 deletions

View File

@ -1,12 +1,11 @@
package sideload
import (
"fmt"
"net/http"
"code.smartsheep.studio/goatworks/roadsign/pkg/sideload/view"
"fmt"
"github.com/gofiber/fiber/v2/middleware/filesystem"
jsoniter "github.com/json-iterator/go"
"net/http"
roadsign "code.smartsheep.studio/goatworks/roadsign/pkg"
"github.com/gofiber/fiber/v2"
@ -43,13 +42,6 @@ func InitSideload() *fiber.App {
},
}))
app.Use("/", filesystem.New(filesystem.Config{
Root: http.FS(view.FS),
PathPrefix: "dist",
Index: "index.html",
NotFoundFile: "index.html",
}))
cgi := app.Group("/cgi").Name("CGI")
{
cgi.Get("/metadata", getMetadata)
@ -67,5 +59,12 @@ func InitSideload() *fiber.App {
webhooks.Put("/sync/:slug", doSync)
}
app.Use("/", filesystem.New(filesystem.Config{
Root: http.FS(view.FS),
PathPrefix: "dist",
Index: "index.html",
NotFoundFile: "dist/index.html",
}))
return app
}

View File

@ -25,7 +25,6 @@ capture_traces = true
[performance]
traces_limit = 256
network_timeout = 3_000
prefork = false
[security]