Closed shen-tian closed 8 years ago
@shen-tian Take a look at the tests. This should work. https://github.com/r0man/ring-cors/blob/master/test/ring/middleware/cors_test.clj#L150
Aha. That works. Thanks! If anyone else is interested, usage:
(def app
(-> app-routes
(wrap-cors :access-control-allow-origin [#"https://example.com"]
:access-control-allow-methods [:get]
:access-control-allow-credentials "true")
other-middleware))
As far as I can tell, this library doesn't support the
Access-Control-Allow-Credentials
header (it doesn't supportAccess-Control-Expose-Headers
andAccess-Control-Max-Age
either).Is this a design decision, or are you open to contributions to add these?