Group middleware between static and non-static file routes.

This commit is contained in:
mikestefanello 2021-12-08 18:58:55 -05:00
parent 30dced6315
commit 4096691df0
3 changed files with 40 additions and 31 deletions

View file

@ -45,7 +45,7 @@ func HasField(v interface{}, name string) bool {
// File appends a cache key to a given filepath so it can remain cached until the app is restarted
func File(filepath string) string {
return fmt.Sprintf("%s?v=%s", filepath, CacheKey)
return fmt.Sprintf("/files/%s?v=%s", filepath, CacheKey)
}
func Link(url, text, currentPath string, classes ...string) template.HTML {