Skip to Main Content

Oracle Database Free

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to solve CORS when calling

Mike KutzAug 23 2025

This is for a Development environment. CORS is not a concern at this time.

Environment:

  • VirtualBox VM for 23.7ai FREE
  • a REST enabled JSON Duality VIEW is the test end-point

Observations:

  • fetching the data works when calling directly
    • web browser URL bar on Host
    • wget in VM
  • fetch fails when done from within Javascript
    • PoC.html file is on host
    • Javascript is using fetch() command

Attempts to resolve

  • placing data locally fails ( file:// seems to be CORS permanently)
  • installing Apache web server fails: ( yum repository seems to be for VMs running inside OCI )
  • adding <entry key="security.externalSessionTrustedOrigins">*<entry> fails
    • default.xml doesn't exist
    • /home/oracle/ords_config/global/settings.xml was modified instead
    • yes, I bounced the entire VM (stop then start)

Desired Outcome:

I would like to edit the PoC.html Javascript code on the Host OS but call and use the REST services provided by ORDS within the VirtualBox VM

Error in web console:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8080/ords/rps/MapTiles/. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 403.

This post has been answered by Mike Kutz on Aug 23 2025
Jump to Answer
Comments
Post Details
Added on Aug 23 2025
2 comments
48 views