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.
