diff --git a/cmd/cake_crm/main.go b/cmd/cake_crm/main.go index f4d3853..e83bcdf 100644 --- a/cmd/cake_crm/main.go +++ b/cmd/cake_crm/main.go @@ -104,12 +104,12 @@ func main() { func cors(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - ua := r.Header.Get("User-Agent") - if !strings.HasPrefix(ua, "crabs") { - w.WriteHeader(403) - return - } - + // ua := r.Header.Get("User-Agent") + // if !strings.HasPrefix(ua, "crabs") { + // w.WriteHeader(403) + // return + // } + w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PATCH, DELETE") w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length, Accept-Encoding, Authorization, ResponseType")