-
Notifications
You must be signed in to change notification settings - Fork 12k
Feature request: allow CORS on local dev server #803
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
Comments
+1 vote for enabling to set custom Access-Control-Allow-Origin parameter for ng serve |
To be able to make CORS http request I had to use the "--proxy" i.e |
I actually solved this issue by using the ember-cli-cors add on. All you have to do is install it using the ng command like so: |
ng install ember-cli-cors |
@wholladay I presume that you meant:
and not
@cotomas can you please try using |
@Brocco No, I first tried |
+1 @wholladay did you configure anything after It looks like all that did was install the npm package in package.json devDependencies for "ember-cli-cors". How does ng serve know about it after it is installed? In my scenario I am trying to port an Angular 1 app where in Dev we had to run |
I tried |
@jmb-mage I did not configure anything differently that I can remember, not did I change the ng serve command. It just kind of... well, started working and I moved on to other issues. |
@wholladay as a workaround I ran the npm http-server onto the It has these attributes:
|
Superseded by #2872, as this was for a pre-webpack version of the CLI. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
angular-cli: 1.0.0-beta.1
node: 5.10.0
os: darwin x64
XMLHttpRequest cannot load http://localhost:4200/system-config.js. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
zone.js:323 Error: Error: XHR error loading http://localhost:4200/system-config.js(…)
I'm sure there must be a way to do this, but I've tried everything I can think of.
The text was updated successfully, but these errors were encountered: