Fixed CORS

This commit is contained in:
2020-11-30 21:22:51 +01:00
parent ebaa93b1ea
commit b24c9dca3c
5 changed files with 22 additions and 12 deletions

View File

@@ -12,6 +12,7 @@ import (
)
func syncHandler(w http.ResponseWriter, r *http.Request) {
(w).Header().Set("Access-Control-Allow-Origin", "*")
if r.URL.Path == "/sync" {
w.Header().Add("Content-Type", "application/json")
syncGames()