mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-11-02 19:57:46 +00:00
Framework update.
This commit is contained in:
@@ -2041,13 +2041,19 @@ namespace OpenWifi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline void ProcessOptions() {
|
inline void ProcessOptions() {
|
||||||
|
// try to figure out if we are doing a CORS options or plain OPTIONS
|
||||||
|
bool CORS = Request->has("Access-Control-Request-Method");
|
||||||
|
if(CORS) {
|
||||||
|
AddCORS(false);
|
||||||
|
} else {
|
||||||
AddCORS(true);
|
AddCORS(true);
|
||||||
SetCommonHeaders();
|
|
||||||
Response->set("Allow", MakeList(Methods_));
|
Response->set("Allow", MakeList(Methods_));
|
||||||
Response->set("Cache-Control", "max-age=604800");
|
Response->set("Cache-Control", "max-age=604800");
|
||||||
|
Response->set("Vary", "Origin, Access-Control-Request-Headers, Access-Control-Request-Method");
|
||||||
|
}
|
||||||
|
SetCommonHeaders();
|
||||||
Response->set("Access-Control-Allow-Credentials", "true");
|
Response->set("Access-Control-Allow-Credentials", "true");
|
||||||
Response->setStatus(Poco::Net::HTTPResponse::HTTP_NO_CONTENT);
|
Response->setStatus(Poco::Net::HTTPResponse::HTTP_NO_CONTENT);
|
||||||
Response->set("Vary", "Origin, Access-Control-Request-Headers, Access-Control-Request-Method");
|
|
||||||
Response->send();
|
Response->send();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user