Skip to content

Commit

Permalink
add allow-headers
Browse files Browse the repository at this point in the history
  • Loading branch information
mc-hamster committed Oct 17, 2020
1 parent 8f0105c commit 0d9481b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/meshwifi/meshhttp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,12 @@ void handleAPIv1ToRadio(HTTPRequest *req, HTTPResponse *res)

if (req->getMethod() != "OPTIONS") {
res->setHeader("Content-Type", "application/x-protobuf");
} else {
res->setHeader("Content-Type", "application/x-protobuf");

}


res->setHeader("Access-Control-Allow-Headers", "Content-Type");
res->setHeader("Access-Control-Allow-Origin", "*");
res->setHeader("Access-Control-Allow-Methods", "PUT, OPTIONS");

Expand Down

0 comments on commit 0d9481b

Please sign in to comment.