Skip to main content
Solved

Any solution to CORS issue with Projection?

  • November 15, 2021
  • 4 replies
  • 298 views

khajeewak
Sidekick (Partner)
Forum|alt.badge.img+3

We are getting CORS issue when sending a request from a web application client to IFS projection? is there any solution to get around this issue?

is there any way to change the response header from projection?

Thank you,

/Jeewan

Best answer by ngCorey

But what if you’re on localhost on your development computer and wish to run the projections from localhost?  They cannot be on the same machine.  Where would you drop the Access-Control-Allow-Origin * entry to allow access from all domains?  On the web server? On the middle ware server?

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

4 replies

Manoj Ruwanhewa
Superhero (Partner)
Forum|alt.badge.img+15
  • Superhero (Partner)
  • 152 replies
  • November 15, 2021

Hi @khajeewak ,

CORS is a browser security feature that restricts cross-origin HTTP requests that are initiated from scripts running in the browser. 

It might be a security issue when a browser directly calls IFS REST APIs

This can be solved by creating a new server based API that calls the IFS Rest API while both are in on the same server.

Moreover, you can create a new rule into the HTTP Response header: Access-Control-Allow-Origin *

Regards

Manoj


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

But what if you’re on localhost on your development computer and wish to run the projections from localhost?  They cannot be on the same machine.  Where would you drop the Access-Control-Allow-Origin * entry to allow access from all domains?  On the web server? On the middle ware server?


Manoj Ruwanhewa
Superhero (Partner)
Forum|alt.badge.img+15
  • Superhero (Partner)
  • 152 replies
  • November 17, 2021

Hi @ngCorey ,

I didn't find a place to change the http header in the MWS configurations. 

But I think for localhost you can try below

For IIS6

  1. Open Internet Information Service (IIS) Manager
  2. Right click the site you want to enable CORS for and go to Properties
  3. Change to the HTTP Headers tab
  4. In the Custom HTTP headers section, click Add
  5. Enter Access-Control-Allow-Origin as the header name
  6. Enter * as the header value
  7. Click Ok twice

khajeewak
Sidekick (Partner)
Forum|alt.badge.img+3
  • Author
  • Sidekick (Partner)
  • 6 replies
  • February 18, 2022

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