diff --git a/main.go b/main.go index 9da4196..7bac796 100644 --- a/main.go +++ b/main.go @@ -196,6 +196,8 @@ func ServeJSONStudent(w http.ResponseWriter, r *http.Request) { log.Printf("Handling %s request from %s: %s [%s]\n", r.Method, r.RemoteAddr, r.URL.Path, r.UserAgent()) w.Header().Set("Content-Type", "application/json") + w.Header().Set("Access-Control-Allow-Origin", "*") + w.Header().Set("Access-Control-Allow-Methods", "GET, OPTIONS") login := strings.TrimSuffix(strings.TrimPrefix(r.URL.Path, "/"), ".json")