Closed KingerLeen closed 3 months ago
Hey @KingerLeen , perhaps you should revisit how CORS work — the browser behaves according to CORS (HTTP) headers of the main HTML document, thus I guess you just should use SetEnv module to set correct CORS headers to whitelist your API domain for JS scripts in your page.
Thank you for maintaining this project.
I can now use this project to load a local HTML (I only need to use it on an Android device), but using APIs for local HTML will result in CORS. This service is 127.0.0.1, but the requested API should be www.myserver.com.
There are two solutions to this problem
The first solution is: WebView allows CORS:
This time, HTML Sent requests is: http://www.myserver.com/api/xxxxx But it doesn't work
The second solution is: StaticServer proxy API
This time, HTML Sent requests is: /api/xxxxx But it doesn't work too.
Here is my source code