We'd love to hear from you! Provide  feedback  to earn a badge today. Take our quick survey
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to over come "blocked by CORS policy: No 'Access-Control-Allow-Origin' header"?

Received Response
80
Views
3
Comments
edited Apr 9, 2019 10:39AM in Customer Portal 3 comments

Content

Hi Folks,

I am calling another application's page via ajax from customer portal  and I got following error message in console

jquery.min.js:4 Access to XMLHttpRequest at 'https://abc.custhelp.com/app/pagename  ' from origin 'https://xyz.custhelp.com'; has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource

Note:

Even though I tried by including following header in php , it is not working for me.

<span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">header</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(48, 51, 54);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: rgb(125, 39, 39);">&#39;Access-Control-Allow-Origin: *&#39;</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit;

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!