mirror of
https://github.com/Tilo-K/ddragon-cdn.git
synced 2026-01-09 00:21:01 +00:00
:)
This commit is contained in:
3
main.go
3
main.go
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user