Hi Tim and all,
I have made sure that apache mod_headers is turned on, and have added this line to my virtual host:
Header add "Access-Control-Header-Origin" "*"
I get the same CORS error messages, unfortunately.
I already tried
Header set "Access-Control-Header-Origin" "*"
and got the same error messages.
I tried adding a filter to my tomcat web.xml:
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
I am including in the file below the errors listed in Opera's console, which are quite detailed.
Here is Firefox's page explaining the CORS errors:
"What went wrong?
The HTTP
request which makes use of CORS failed because the HTTP connection
failed at either the network or protocol level. The error is not
directly related to CORS, but is a fundamental network error of some
kind.
In many cases, it is caused by a browser plugin (e.g. an ad blocker or privacy protector) blocking the request.
Other possible causes include:
- Trying to access an https resource that has an invalid certificate will cause this error.
- Trying to access an http resource from a page with an https origin will also cause this error.
- As of Firefox 68, https pages are not permitted to access http://localhost, although this may be changed by Bug 1488740.
- The server did not respond to the actual request (even if it responded to the Preflight request). One scenario might be an HTTP service being developed that panicked without returning any data."
So I turned off TRACKING in Firefox for my site. Here are the Firefox errors (the same as before) for the /home page:
It appears from their message above that Firefox does not allow my https site to contact
http://localhost. I do not know how to turn this off. Maybe I can do that in Chrome. I will check.
Thanks for help, and best regards,
Paul