Skip to content
Snippets Groups Projects
Commit c277c6e8 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Cannot expect CORS headers without Origin in the request I guess

And now they all pass so everything works fine, great???
parent 3414de67
No related branches found
No related tags found
1 merge request!87Add tests for CORS behavior
......@@ -104,11 +104,13 @@ corsTests =
let app = paymentServerApp origins stripeConfig trivialIssue db
let path = "/v1/stripe/charge"
let theRequest = setPath defaultRequest { requestMethod = method, requestHeaders = headers} path
let theRequest = setPath defaultRequest
{ requestMethod = method
, requestHeaders = ("origin", "example.invalid"):headers
} path
let theSRequest = SRequest theRequest body
(flip runSession) app $ do
response <- srequest theSRequest
liftIO $ print response
assertHeader "Access-Control-Allow-Origin" "example.invalid" response
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment