This commit is contained in:
2023-01-29 22:39:52 +01:00
parent ee9867d80c
commit 605e1dad39

View File

@@ -127,8 +127,7 @@ func loadCurrent() {
func cors(fs http.Handler) http.HandlerFunc { func cors(fs http.Handler) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) { return func(w http.ResponseWriter, r *http.Request) {
// do your cors stuff (*w).Header().Set("Access-Control-Allow-Origin", "*")
// return if you do not want the FileServer handle a specific request
fs.ServeHTTP(w, r) fs.ServeHTTP(w, r)
} }