Thursday, October 12, 2023

403 forbidden error in oracle apex 20.2.1 does not support Cross Origin Sharing request

Can not access to oracle apex. faced below issue when tried to login from ORDS on development mode. 

 


403 Forbidden

The request cannot be processed because this resource does not support Cross Origin Sharing requests, or the request Origin is not authorized to access this resource. If ords is being reverse proxied, ensure the front end server is propagating the host name, for mod_proxy ensure ProxyPreserveHost oi set ON.

 

Solution: 

Application ORDS is configured to access only with https://, so we have added below parameter in ORDS defaults.xml (ords/conf/ords/defaults.xml)  configuration file and restarting ORDS. it resolved the issue.  

 

<entry key="security.forceHTTPS">true</entry>

 

Application configured with ORDS in Weblogic server. 

 

 

Just FYI- 

From ORDS 20.4 onwards we can use this below parameter for cross origin sharing request

 

 

<entry key="security.externalSessionTrustedOrigins">http://example.com,https://example.com:8443</entry>

 



For more info- 

Cross-Origin Resource Sharing Feature

 

https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/22.1/orddg/migrating-mod_plsql-ords.html#GUID-ACAAB207-8475-403E-A757-304D7E76B2EF