I'm having a pretty weird problem with CORS on a webapp I'm trying to make
I'm using Servlets (Tomcat8.0) for the backend. It's a school project, so I can't use a framework
A GET request to
You aren't making a request to
http://localhost:8080/FileBox/dashboard. The error message says you are making a cross-origin request using an unsupported scheme and that
http is a supported scheme.
Presumably you have made the two mistakes of:
You should be using a relative URL:
but are trying to use an absolute URL:
but have typed it wrong and are actually requesting
Possibly by double clicking the file in your system file manager, you have bypassed your HTTP server and are loading something like
Combined with the previous mistake, you end up trying to request
file:///c:/users/you/yourproject/localhost:8080/FileBox/dashboard, with Ajax and get a security violation.
http://localhost:8080instead of double clicking files in your file manager