mirror of https://github.com/jlelse/GoBlog
Fix
This commit is contained in:
parent
8c73686a6f
commit
b2c618f300
|
@ -3,7 +3,6 @@ package main
|
|||
import (
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
@ -29,5 +28,5 @@ func allStaticPaths() (paths []string) {
|
|||
|
||||
// Gets only called by registered paths
|
||||
func serveStaticFile(w http.ResponseWriter, r *http.Request) {
|
||||
http.ServeFile(w, r, path.Join(staticFolder, r.URL.Path))
|
||||
http.ServeFile(w, r, filepath.Join(staticFolder, r.URL.Path))
|
||||
}
|
||||
|
|
|
@ -90,5 +90,5 @@ func allAssetPaths() []string {
|
|||
// Gets only called by registered paths
|
||||
func serveAsset(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Add("Cache-Control", "public,max-age=31536000,immutable")
|
||||
http.ServeFile(w, r, path.Join(compiledAssetsFolder, r.URL.Path))
|
||||
http.ServeFile(w, r, filepath.Join(compiledAssetsFolder, r.URL.Path))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue