From 0d9481b6ea81e3dace9ca82b21568f3d77383f83 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Fri, 16 Oct 2020 18:00:28 -0700 Subject: [PATCH] add allow-headers --- src/meshwifi/meshhttp.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/meshwifi/meshhttp.cpp b/src/meshwifi/meshhttp.cpp index bba6db6da..85e4bf73e 100644 --- a/src/meshwifi/meshhttp.cpp +++ b/src/meshwifi/meshhttp.cpp @@ -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");