under the https protocol, the post request is cross-domain, the get request is not cross-domain, and the http protocol is fine.
related codes
under the https protocol, the post request is cross-domain, the get request is not cross-domain, and the http protocol is fine.
related codes
PHP Code:
http://localhost:3000");
header ("Access-control-Allow-Origin:*");
/ / the response header is set to ajax submission
header ("Access-Control-Allow-Headers:X-Requested-With");
/ / allow to carry user authentication credentials (that is, allow requests sent by the client to carry Cookie)
header ("Access-Control-Allow-Credentials:true");
write to the inside of the method
Previous: Problems of path Generation in svg
Next: How to realize "multithreading" downloading and breakpoint continuation of large files by JS