CORS Problemas

125 views
Skip to first unread message

Rodrigo Carlstrom

unread,
Nov 1, 2018, 11:45:55 AM11/1/18
to Angular and AngularJS discussion

Good morning people! I'm trying to make an HTTP call to the Camunda BPM Restore API (apache-tomcat-9.0.5) via Angular 6, but it is giving the following error:

Access to XMLHttpRequest at 'http://localhost:8080/engine-rest/process-definition/key/createUser/start' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
user.service.ts:79 Http failure response for (unknown url): 0 Unknown Error


I've already started chrome with --disable-web-security. Already tried with an extension:

Capturar.PNG


But I can not get out of the dilemma.
Would anyone have a tip?

Sander Elias

unread,
Nov 1, 2018, 11:41:45 PM11/1/18
to Angular and AngularJS discussion
Hi Rodrigo,

CORS is a server-side setting. Nothing you can do in your app to circumvent that, other as using a cors proxy.
have a  look at this.

Regards
Sander

Rodrigo Carlstrom

unread,
Nov 5, 2018, 12:23:40 PM11/5/18
to Angular and AngularJS discussion

Hi Sander, thank you for your response. I did the setup on
I did the setup on C: \ CamundaBPM \ camunda-bpm-tomcat-7.9.0 \ server \ apache-tomcat-9.0.5 \ webapps \ engine-rest \ WEB-INF \ web.xml but the problem continues. :(

Sander Elias

unread,
Nov 5, 2018, 12:34:24 PM11/5/18
to Angular and AngularJS discussion
Hi Rodrigo,

As I don't have any experience with tomcat, I can't help you. Try finding someone that can help you with the tomcat setup. You can not fix this from the client side.

Regards
Sander

Rodrigo Carlstrom

unread,
Nov 5, 2018, 12:45:06 PM11/5/18
to ang...@googlegroups.com
ll right, thank you anyway! 
If anyone has any tips, my thanks!

Rodrigo Carlstrom
Black Belt (Lean Six Sigma)
Especialista em BPM
PMP® - Project Management Professional
ID Number: #1272965

Celular: (11) 9.4114-9380
Whatsapp: (19) 9.8116-8066
Skype: rodrigocarlstrom


--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Tito

unread,
Nov 5, 2018, 6:31:42 PM11/5/18
to Angular and AngularJS discussion
try to change all localhost references to 127.0.0.1
Reply all
Reply to author
Forward
0 new messages