CORS Error using Universal Display File
Posted: Thu Nov 29, 2018 3:43 pm
I've implemented my first Universal Display File to expose as a Web Service.
I've got the URL working fine from a browser.
However, the true purpose is to have a web app use the URL to get information from the iSeries.
We are getting a CORS error : "origin 'http://localhost:4567 has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
In researching this, I found an IBM Page that seems to address this:
http://www-01.ibm.com/support/docview.w ... s8N1022213
This suggests adding some lines to the httpd.conf file:
<Location />
Require All granted
Header set Access-Control-Allow-Origin "*"
</Location>
I've added those lines to the httpd.conf, butg when re-starting the http server for ProfoundUI, it failed.
In the logs, I see this : ZSRV_MSG0387: SIGTERM received. Shutting down.
Any other ideas on how to resolve the CORS error? Or any clues on why the server failed when I added those lines?
(There is another set of lines that can be added, but not being familiar, I didn't want to cause more problems.)
I've got the URL working fine from a browser.
However, the true purpose is to have a web app use the URL to get information from the iSeries.
We are getting a CORS error : "origin 'http://localhost:4567 has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
In researching this, I found an IBM Page that seems to address this:
http://www-01.ibm.com/support/docview.w ... s8N1022213
This suggests adding some lines to the httpd.conf file:
<Location />
Require All granted
Header set Access-Control-Allow-Origin "*"
</Location>
I've added those lines to the httpd.conf, butg when re-starting the http server for ProfoundUI, it failed.
In the logs, I see this : ZSRV_MSG0387: SIGTERM received. Shutting down.
Any other ideas on how to resolve the CORS error? Or any clues on why the server failed when I added those lines?
(There is another set of lines that can be added, but not being familiar, I didn't want to cause more problems.)