How to handle OPTIONS requests in the background

clipboard.png

headers: "Content-Type": "application/json"
"/getProjectsByUserId"
POSTheaders: "Content-Type": "application/json",
POSTOPTIONS
/getProjectsByUserIdOPTIONS
RESTEASY003655: No resource method found for options, return OK with Allow header
500

clipboard.png

OPTIONS200.OPTIONSPOST

springfilterhttp://www.mamicode.com/info-...

clipboard.png

is there anything else I can do? no, no, no.

Mar.13,2021

this is a cross-domain problem. The pre-check request OPTIONS returns 200 No problem. In addition, your API is used to handle POST , so you not only need to handle OPTIONS , but also support POST processing


OPTION request.
should be in filter to verify whether


I use filter on the Internet. The weird thing about
is that I need @ Order (1) to set the highest filter priority to take effect.


option is a pre-request, cross-domain or complex request, the browser will automatically initiate a pre-request, you can set the cache time of options

// 20
header('Access-Control-Max-Age: 1728000');
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-1e50e48-4d485.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-1e50e48-4d485.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?