mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-02 02:39:57 +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.
|
||||
res->setHeader("Content-Type", "application/x-protobuf");
|
||||
|
||||
if (req->getMethod() != "OPTIONS") {
|
||||
res->setHeader("Content-Type", "application/x-protobuf");
|
||||
}
|
||||
|
||||
res->setHeader("Access-Control-Allow-Origin", "*");
|
||||
res->setHeader("Access-Control-Allow-Methods", "PUT, OPTIONS");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user