![]() For Chrome, the maximum seconds for Access-Control-Max-Age is 600 which is 10 minutes, according to chrome source code.You can set a Access-Control-Max-Age for the OPTIONS request, so that it will not check the permission again until it is expired.Īccess-Control-Max-Age gives the value in seconds for how long the response to the preflight request can be cached for without sending another preflight request. Connection, User-Agent, etc.), the only headers which are allowed to be manually set are:Ī simple request will not cause a pre-flight OPTIONS request. Set Access-Control-Max-Age for the OPTIONS requestĪ simple cross-site request is one that meets all the following conditions:Īpart from the headers set automatically by the user agent (e.g. ![]() Make sure your request is a "simple request".There are two ways you can work around it: Have gone through this issue, below is my conclusion to this issue and my solution.Īccording to the CORS strategy (highly recommend you read about it) You can't just force the browser to stop sending OPTIONS request if it thinks it needs to. No ReadableStream object is used in the request. No event listeners are registered on any XMLHttpRequestUpload object used in the request these are accessed using the XMLHttpRequest.upload property. ![]() The only allowed values for the Content-Type header are:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |