Joke Collection Website - Public benefit messages - Will a text message be sent to remind you if the cors status is abnormal?

Will a text message be sent to remind you if the cors status is abnormal?

If the CORS status is abnormal, a text message will be sent to remind you.

CORS, the full name of Cross-Origin Resource Sharing, is a mechanism that allows resources in the current domain to be accessed by script requests from other domains. Usually, browsers prohibit such cross-domain requests due to the same domain security policy. When it is necessary to monitor the execution of database sql, and if there is an abnormality, the user will be reminded via email or text message.

CORS needs to be supported by both the browser and the server. All browsers support this function, but IE browser cannot be lower than IE10. CORS allows the browser to issue XMLHttpRequest requests to cross-origin servers, thereby overcoming the limitation that AJAX can only be used from the same origin.

Common errors of CORS

1. CORS not allowed

CORS not allowed is one of the most common CORS errors. It means that the target server does not have a CORS policy configured and therefore the cross-origin request is blocked by the browser.

2. Unauthorized request

Unauthorized request This error indicates that although the target server is configured with a CORS policy, the request is not authorized.

3. Preflight request failed

Some CORS requests, such as requests with custom headers, will first send a preflight request (OPTIONS request) to determine whether Allow actual requests. If the preflight request fails, the actual request will also fail.

4. Invalid CORS header

An invalid CORS header error means that the request contains an invalid CORS header, such as using a sensitive CORS header in an insecure context. head.