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 {
return func(w http.ResponseWriter, r *http.Request) {
// do your cors stuff
// return if you do not want the FileServer handle a specific request
(*w).Header().Set("Access-Control-Allow-Origin", "*")
fs.ServeHTTP(w, r)
}