-
Notifications
You must be signed in to change notification settings - Fork 173
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
Angular 6 CORS issue #86
Comments
Have an exactly same problem. In dev build everything works fine. But got the same error when building with --prod flag. Have you managed to find a solution yet? |
It was working for me before with angular 5. |
Did you solve ? |
I have the same problem, by the way for me it is working when the server is running on http, but when I am running the server on https, I am not getting any response from server, 0, which mean cors issue, |
Same problem here |
also same here :( .. |
same here... any progress on this issue? |
same here :( |
also same here ... |
same here... |
I also need help! :( |
you could use proxy to solve this issue: STEP1:
and in your angular service file you dont need to add full url in order to get or post: STEP 2:
STEP 3: edit your package.json file :
Done. |
Thks, but it works only for dev not prod environment ! |
for production you can use nginx to do the proxy function for you, I have already implemented on production and its working fine. |
hi but dont work for me un dev, I always have a response OPTIONS, my api is
on Homestead, laravel with passport auth
Nelson Calderón
My Numbers: +506 8789-7230
…On Wed, Nov 21, 2018 at 3:11 AM m00zi ***@***.***> wrote:
for production you can use nginx to do the proxy function for you, I have
already implemented on production and its working fine.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOowzamKlITPWxisKgnuMXqFYX8KCQvWks5uxRipgaJpZM4T_nPZ>
.
|
hi,for me cors issue is solved,but in my case for api i need to call only localhost no need to use port,so in that case for api it is taking localhost:4200 with api path.so that am not getting data from api.please any one have idea. |
You can follow this tutorials to solve this issue |
Also facing same issue |
After upgrading to Angular 6 I have this issue :
Failed to load https://api.api.ai/v1/query?*** Method undefined is not allowed by Access-Control-Allow-Methods in preflight response.
Indeed the "access-control-request-method" on the OPTION request is undefined :
The text was updated successfully, but these errors were encountered: