pact-foundation / pact-stub-server

Standalone pact stub server
MIT License
75 stars 19 forks source link

request with with_credentials you cannot have the CORS header Access-Control-Allow-Origin set to * #32

Closed vjustov closed 4 years ago

vjustov commented 4 years ago

we found a problem with the pact-stub-server when used along test cafe[1]: If you make a request with with_credentials you cannot have the CORS header Access-Control-Allow-Origin to * [2] do you think it would be possible to manually set the header to the request referrer or something? my knowledge of rust is null so i cannot really help with making a PR, but im happy to help in any other way.

[https://devexpress.github.io/testcafe/documentation/test-api/intercepting-http-requests/mocking-http-requests.html#mocking-cross-domain-requests]

[https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentials]

uglyog commented 4 years ago

0.3.2 has been released with a --cors-referer flag that will enable the behaviour you want