mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-19 09:12:45 +00:00
don't send content-type when options is set
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user