How to block pre-requests made by browsers for non-simple requests?

< H1 > when the browser makes a non-simple request to the server, there will be an options pre-request. Can this be shielded? < / H1 >

now every time I enter the application, I verify the token and get a new token,. However, due to the pre-request problem, my real post request will be delayed. During this period, the token, has expired, causing the interface in the middle to hang up. Is there any solution

?

clipboard.png


  • turn off CORS if you are of the same origin. The default should be off, the xhr parameter is wrong?
  • remove unsafe request headers from different sources: https://fetch.spec.whatwg.org.
  • if you must bring the request header, set the Access-Control-Max-Age higher and cache OPTIONS in advance, then you won't need it later.

https://developer.mozilla.org.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf273b-31e02.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf273b-31e02.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?