Implement CORS for the administrative interface.

This commit is contained in:
Juliusz Chroboczek
2025-06-13 15:00:16 +02:00
parent 7204889085
commit a6410b5a68
4 changed files with 54 additions and 20 deletions
+2 -2
View File
@@ -178,7 +178,7 @@ func whipEndpointHandler(w http.ResponseWriter, r *http.Request) {
}
if r.Method != "POST" {
methodNotAllowed(w, "OPTIONS", "POST")
methodNotAllowed(w, "POST")
return
}
@@ -323,7 +323,7 @@ func whipResourceHandler(w http.ResponseWriter, r *http.Request) {
}
if r.Method != "PATCH" {
methodNotAllowed(w, "OPTIONS", "DELETE", "PATCH")
methodNotAllowed(w, "DELETE, PATCH")
return
}