missing cors

This commit is contained in:
tavo 2024-09-22 14:24:52 -06:00
parent 0ea5fbdaef
commit 0d40858bf9

View file

@ -464,5 +464,5 @@ func FetchSiteHandler(db *sql.DB) http.HandlerFunc {
func enableCORS(w http.ResponseWriter) { func enableCORS(w http.ResponseWriter) {
w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE") w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization") w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization, X-Requested-With")
} }