Skip to main content
Solved

Anyone know how to get around the CORS issue with REST


Forum|alt.badge.img+1

Hello:We deployed a REST based IFS web service and when we test an app against the web server we are getting CORS errors. I can run Chrome --disable-web-security to get around it in testing but we need our users to use it on their browsers.CORS-Cross Origin Resource Sharing.

Best answer by luca.puccini

I have just solved it!

You have to insert a new rule into the HTTP Response header: Access-Control-Allow-Origin *. Please note that, instead of using the * that means everyone, you can specify a list of knowed url.

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

7 replies

Forum|alt.badge.img+1
  • Author
  • Do Gooder
  • 4 replies
  • June 23, 2021

I think we solved it on our own. It’s not really an IFS question.


Forum|alt.badge.img+9
  • Sidekick (Partner)
  • 59 replies
  • July 11, 2021
julfeng wrote:

I think we solved it on our own. It’s not really an IFS question.

Hi @julfeng 

I’m interested to know how you solved it, as I am facing a similar issue when trying to access an IFS web service.

Thanks
Miraj


Forum|alt.badge.img+8
  • Do Gooder (Customer)
  • 28 replies
  • Answer
  • July 12, 2021

I have just solved it!

You have to insert a new rule into the HTTP Response header: Access-Control-Allow-Origin *. Please note that, instead of using the * that means everyone, you can specify a list of knowed url.


Forum|alt.badge.img+1
  • Author
  • Do Gooder
  • 4 replies
  • July 19, 2021

Sorry I got back so late, been busy. I agree with Luca’s response also you can create a server based API that calls the IFS Rest, instead of the client going directly to the IFS REST call, that’s what we ended up doing. It’s a security issue when a browser directly calls a REST API from IFS I believe. In short, If you create your own API on the same server that calls the IFS API it will also solve the problem.


Forum|alt.badge.img+6
  • Do Gooder (Customer)
  • 13 replies
  • November 8, 2021

I’m not following what I need to do.  Is the Response Header in an XML file somewhere or is it accessible from the IFS Middleware Console?  If so where?  


Forum|alt.badge.img+3
  • Do Gooder (Customer)
  • 2 replies
  • November 9, 2021

I’m in the same boat.  I need to know where to put this information to pass along to the server team.


khajeewak
Sidekick (Partner)
Forum|alt.badge.img+3
  • Sidekick (Partner)
  • 6 replies
  • November 15, 2021

I am also having the same issue, We couldnt get this ‘ Access-Control-Allow-Origin * ‘ worked? did this’ Access-Control-Allow-Origin *  work for anyone?

/Jeewan


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings