Answer the question
In order to leave comments, you need to log in
The server.php file is not downloaded when submitting data via a form to the server?
Hello!
Created a server using Open Server, uploaded the site. When trying to send data through a form, in Chrome and Opera, such an error in the console:
Access to XMLHttpRequest at 'file:///D:/Open%20Server/OSPanel/domains/test.org/server.php' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
Chrome Canary same + error:
POST file:///D:/Open%20Server/OSPanel/domains/test.org/server.php net::ERR_FAILED
In Network tab (Chrome Canary only):
On Stack Overflow wrote that this occurs due to CORS Policy and advised to disable it with the --disable-web-security --user-data-dir flag. Put a flag - does not work. There are no errors in the code, I checked it 10 times.
Is there anything else I can do?
Answer the question
In order to leave comments, you need to log in
Try to specify http:// 127.0.0.1/test.org/server.php/ or whatever it is in the open server
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question