chore (canary): canary release for rewrite

This commit is contained in:
MickaelK
2024-06-24 23:19:40 +10:00
parent d020f4c1bd
commit 4f6ceb3fa0
5 changed files with 33 additions and 33 deletions

View File

@ -194,11 +194,6 @@ func ServeBackofficeHandler(ctx *App, res http.ResponseWriter, req *http.Request
}
func ServeFrontofficeHandler(ctx *App, res http.ResponseWriter, req *http.Request) {
url := req.URL.Path
if filepath.Ext(filepath.Base(url)) != "" {
ServeFile("/")(ctx, res, req)
return
}
ua := req.Header.Get("User-Agent")
if strings.Contains(ua, "MSIE ") || strings.Contains(ua, "Trident/") || strings.Contains(ua, "Edge/") {
// Microsoft is behaving on many occasion differently than Firefox / Chrome.
@ -214,7 +209,7 @@ func ServeFrontofficeHandler(ctx *App, res http.ResponseWriter, req *http.Reques
`)))
return
}
url = TrimBase(req.URL.Path)
url := TrimBase(req.URL.Path)
if url != "/" && strings.HasPrefix(url, "/s/") == false &&
strings.HasPrefix(url, "/view/") == false && strings.HasPrefix(url, "/files/") == false &&
url != "/login" && url != "/logout" && strings.HasPrefix(url, "/tags") == false {