mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-02 10:50:40 +00:00
don't send content-type when options is set
This commit is contained in:
parent
ba549d8fcd
commit
8f0105ccd9
@ -379,7 +379,11 @@ void handleAPIv1ToRadio(HTTPRequest *req, HTTPResponse *res)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Status code is 200 OK by default.
|
// Status code is 200 OK by default.
|
||||||
|
|
||||||
|
if (req->getMethod() != "OPTIONS") {
|
||||||
res->setHeader("Content-Type", "application/x-protobuf");
|
res->setHeader("Content-Type", "application/x-protobuf");
|
||||||
|
}
|
||||||
|
|
||||||
res->setHeader("Access-Control-Allow-Origin", "*");
|
res->setHeader("Access-Control-Allow-Origin", "*");
|
||||||
res->setHeader("Access-Control-Allow-Methods", "PUT, OPTIONS");
|
res->setHeader("Access-Control-Allow-Methods", "PUT, OPTIONS");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user