Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add PATCH and OPTIONS to the list of allowed cors methods #269

Closed
wants to merge 1 commit into from

3 participants

@nherzing

This merely adds PATCH and OPTIONS to the "Access-Control-Allow-Methods" header on CORs preflight requests. It was discussed in #235 but no action was ever taken.

@rkneufeld
Collaborator

Looks good. @ohpauleez?

@ohpauleez
Owner

This was fixed in: pedestal/pedestal@7e00640

@ohpauleez ohpauleez closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 3 deletions.
  1. +1 −3 service/src/io/pedestal/http/cors.clj
View
4 service/src/io/pedestal/http/cors.clj
@@ -33,7 +33,7 @@
(str "Content-Type, "
(when requested-headers (str requested-headers ", "))
(convert-header-names (keys (:headers request))))
- "Access-Control-Allow-Methods" "GET, POST, PUT, DELETE, HEAD"}
+ "Access-Control-Allow-Methods" "GET, POST, PUT, DELETE, HEAD, PATCH, OPTIONS"}
(when creds {"Access-Control-Allow-Credentials" (str creds)})
(when max-age {"Access-Control-Max-Age" (str max-age)}))]
(log/info :msg "cors preflight"
@@ -111,5 +111,3 @@
(if-not origin
(assoc-in context [:request :headers "origin"] "")
context)))
-
-
Something went wrong with that request. Please try again.