routes: change 303 -> 301 for /static -> /assets
All checks were successful
continuous-integration/drone/push Build is passing

* should enable users' browsers to make use of the status code and cache
  the redirect (in case anybody accesses the older version of the app
  and hits /static)
This commit is contained in:
leo 2023-04-28 19:07:43 +02:00
parent 82bc22e192
commit 3cb2da457e
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

@ -21,7 +21,7 @@ func (a *App) SetupRoutes() {
e.GET(
"/static/*",
func(c echo.Context) error {
return c.Redirect(http.StatusSeeOther, c.Request().URL.Path)
return c.Redirect(http.StatusMovedPermanently, c.Request().URL.Path)
},
middleware.Rewrite(
map[string]string{"/static/*": "/assets/$1"},