loading user agreement from a "resource" now

This commit is contained in:
2026-03-04 16:34:19 -07:00
parent 573707587d
commit e158af99f1
10 changed files with 124 additions and 42 deletions
+5 -6
View File
@@ -53,12 +53,11 @@ func setupEcho() *echo.Echo {
uiset := []echo.MiddlewareFunc{ui.SessionStoreInjector, ui.ContextCreator, ui.IPBanTest, ui.CookieLoginTest}
e.RouteNotFound("/*", ui.AmWrap(AmNotFoundHandler), uiset...)
if config.GlobalConfig.Site.ExternalPath != "" {
root, err := os.OpenRoot(config.GlobalConfig.Site.ExternalPath)
if err != nil {
panic(err)
}
fs := root.FS()
fs, err := config.AmOpenExternalContentPath()
if err != nil {
panic(err)
}
if fs != nil {
e.StaticFS("/ext", fs)
e.GET("/fext/*", ui.AmWrap(ui.AmStaticFramePage(fs, "/fext/")), uiset...)
}