I get the following error:
Access to XMLHttpRequest at '
http://example:8080/*' from origin'http://example'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.
I am working through Apache web-server, every request I am redirecting to Tomcat, but I am not able to find where to remove the 8080 in response URL, I want to handle from Apache web-server.
I tried with this but no results:
SetEnvIf Origin "^(.*\.example:8080/ccms)$" ORIGIN_SUB_DOMAIN=$1
Header set Access-Control-Allow-Origin "%{ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN
Header set Access-Control-Allow-Methods: "*"
Header set Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, Accept, Authorization"