fix: correct path handling for static
on docker, you'd need to do /static and not /app/static
This commit is contained in:
parent
9d23b391fe
commit
1ab01ac492
@ -44,7 +44,7 @@ func (app *Application) indexHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if fileInfo, err := os.Stat(path); err == nil && !fileInfo.IsDir() {
|
||||
http.ServeFile(w, r, path)
|
||||
} else {
|
||||
http.StripPrefix("/", http.FileServer(http.Dir("static"))).ServeHTTP(w, r)
|
||||
http.StripPrefix("/", http.FileServer(http.Dir("./static"))).ServeHTTP(w, r)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user