Hi,
I think this questions is not fully related to this community---
We had an inhouse server.
APEX 5.1,
DB-11.
Apex hosted on a WLS along with Forms/Reports.
We have a hybrid mobile app built using ionic. It uses webservices created using APEX REST
Sample resource - https://server.com/ords/workspace/demows/employees/
Now we are moving the server to AWS with
APEX 19.1
DB 12c
Hosted using a Tomcat server. Below is added on Tomcat server config
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<init-param>
<param-name>allowedOrigins</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>allowedMethods</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>allowedHeaders</param-name>
<param-value>*</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
I have imported the webservices to new environment.
Sample resource now- http://server.com/ords/workspace/demows/employees/ --- It is not HTTPS
I get the below error when trying to access the webserices from mobile app
Access to XMLHttpRequest at 'http://server.com/ords/workspace/demows/employees/' from origin 'http://localhost:8100' 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.
- HttpErrorResponse {headers: HttpHeaders, status: 0, statusText: "Unknown Error", url: null, ok: false, …}
- headers: HttpHeaders
- normalizedNames: Map(0) {}
- lazyUpdate: null
- headers: Map(0) {}
- __proto__: Object
- status: 0
- statusText: "Unknown Error"
- url: null
- ok: false
- name: "HttpErrorResponse"
- message: "Http failure response for (unknown url): 0 Unknown Error"
- error: ProgressEvent {isTrusted: true, lengthComputable: false, loaded: 0, total: 0, type: "error", …}
- __proto__: HttpResponseBase
Can you please guide me how to resolve this issue?