Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS support? #52

Closed
KhanhHH opened this issue Jul 18, 2018 · 5 comments
Closed

CORS support? #52

KhanhHH opened this issue Jul 18, 2018 · 5 comments

Comments

@KhanhHH
Copy link

KhanhHH commented Jul 18, 2018

I can't send request from my app which is running on localhost port 4200 to mock server (port 8080), is there any solution? Thanks!

@odino
Copy link
Contributor

odino commented Jul 19, 2018

Hi @KhanhHH, I think we haven't thought of mockserver in the context of a browser (where you'd bump into issues with CORS). Can you try adding the ACAO header to your responses? That might fix it.

@asgoth
Copy link

asgoth commented Sep 5, 2018

Hello @KhanhHH, it might be that you need an OPTIONS call first. Check #46 (comment)

@Hollister009
Copy link

@odino Access-Control-Allow-Origin: * resolved my issue, thanks

@odino odino closed this as completed Mar 14, 2019
@huyanhp
Copy link

huyanhp commented Mar 14, 2019

I personally prefer disabling CORS check of Chrome ( about 30 secs of search and trial) , even though I managed to setup CORS for our integration server with nginx.

@james2doyle
Copy link

I used an OPTIONS.mock file to support window.fetch calls in the browser.

You can see the details here: https://gist.github.com/james2doyle/a9caf383a5c6ac66594a5831adeddb00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants