3 Posts
0
390
February 27th, 2023 21:00
iDRAC CORS Issue
Hi,
I am trying to make some simple web application that get system status using redfish api through iDRAC port. I can test some redfish apis through iDRAC port(we assigned ip to iDRAC and can access through ip) using insomnia tool(rest api test tool). but when I call them in web application(react, javascript), the browser returns 'cors errors'
Could you please let me know how to solve 'cors errors'?
Error message :
Access to XMLHttpRequest at 'https:// /redfish/v1/SessionService/Sessions' from origin ' http://localhost:3000' 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.
No Events found!
DELL-Marco B
Moderator
•
3.9K Posts
0
February 28th, 2023 02:00
Hello,
maybe this can help you Cross-origin XMLHttpRequest - Chrome Developers
Regular web pages can use the XMLHttpRequest object to send and receive data from remote servers, but they're limited by the same origin policy. Content scripts initiate requests on behalf of the web origin that the content script has been injected into and therefore content scripts are also subject to the same origin policy. (Content scripts have been subject to CORB since Chrome 73 and CORS since Chrome 83.) Extension origins aren't so limited - a script executing in an extension's background page or foreground tab can talk to remote servers outside of its origin, as long as the extension requests cross-origin permissions.
Anyway it is not something that we can directly support as technical support.
Hope it helps
Thanks