mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-24 09:26:52 +00:00
Updted protobuf url (#4411)
This commit is contained in:
parent
789e8f02bf
commit
5111bd703a
@ -161,7 +161,7 @@ void handleAPIv1FromRadio(HTTPRequest *req, HTTPResponse *res)
|
|||||||
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", "GET");
|
res->setHeader("Access-Control-Allow-Methods", "GET");
|
||||||
res->setHeader("X-Protobuf-Schema", "https://raw.githubusercontent.com/meshtastic/protobufs/master/mesh.proto");
|
res->setHeader("X-Protobuf-Schema", "https://raw.githubusercontent.com/meshtastic/protobufs/master/meshtastic/mesh.proto");
|
||||||
|
|
||||||
uint8_t txBuf[MAX_STREAM_BUF_SIZE];
|
uint8_t txBuf[MAX_STREAM_BUF_SIZE];
|
||||||
uint32_t len = 1;
|
uint32_t len = 1;
|
||||||
@ -205,7 +205,7 @@ void handleAPIv1ToRadio(HTTPRequest *req, HTTPResponse *res)
|
|||||||
res->setHeader("Access-Control-Allow-Headers", "Content-Type");
|
res->setHeader("Access-Control-Allow-Headers", "Content-Type");
|
||||||
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");
|
||||||
res->setHeader("X-Protobuf-Schema", "https://raw.githubusercontent.com/meshtastic/protobufs/master/mesh.proto");
|
res->setHeader("X-Protobuf-Schema", "https://raw.githubusercontent.com/meshtastic/protobufs/master/meshtastic/mesh.proto");
|
||||||
|
|
||||||
if (req->getMethod() == "OPTIONS") {
|
if (req->getMethod() == "OPTIONS") {
|
||||||
res->setStatusCode(204); // Success with no content
|
res->setStatusCode(204); // Success with no content
|
||||||
|
@ -230,7 +230,7 @@ int handleAPIv1ToRadio(const struct _u_request *req, struct _u_response *res, vo
|
|||||||
ulfius_add_header_to_response(res, "Access-Control-Allow-Origin", "*");
|
ulfius_add_header_to_response(res, "Access-Control-Allow-Origin", "*");
|
||||||
ulfius_add_header_to_response(res, "Access-Control-Allow-Methods", "PUT, OPTIONS");
|
ulfius_add_header_to_response(res, "Access-Control-Allow-Methods", "PUT, OPTIONS");
|
||||||
ulfius_add_header_to_response(res, "X-Protobuf-Schema",
|
ulfius_add_header_to_response(res, "X-Protobuf-Schema",
|
||||||
"https://raw.githubusercontent.com/meshtastic/protobufs/master/mesh.proto");
|
"https://raw.githubusercontent.com/meshtastic/protobufs/master/meshtastic/mesh.proto");
|
||||||
|
|
||||||
if (req->http_verb == "OPTIONS") {
|
if (req->http_verb == "OPTIONS") {
|
||||||
ulfius_set_response_properties(res, U_OPT_STATUS, 204);
|
ulfius_set_response_properties(res, U_OPT_STATUS, 204);
|
||||||
@ -267,7 +267,7 @@ int handleAPIv1FromRadio(const struct _u_request *req, struct _u_response *res,
|
|||||||
ulfius_add_header_to_response(res, "Access-Control-Allow-Origin", "*");
|
ulfius_add_header_to_response(res, "Access-Control-Allow-Origin", "*");
|
||||||
ulfius_add_header_to_response(res, "Access-Control-Allow-Methods", "GET");
|
ulfius_add_header_to_response(res, "Access-Control-Allow-Methods", "GET");
|
||||||
ulfius_add_header_to_response(res, "X-Protobuf-Schema",
|
ulfius_add_header_to_response(res, "X-Protobuf-Schema",
|
||||||
"https://raw.githubusercontent.com/meshtastic/protobufs/master/mesh.proto");
|
"https://raw.githubusercontent.com/meshtastic/protobufs/master/meshtastic/mesh.proto");
|
||||||
|
|
||||||
uint8_t txBuf[MAX_STREAM_BUF_SIZE];
|
uint8_t txBuf[MAX_STREAM_BUF_SIZE];
|
||||||
uint32_t len = 1;
|
uint32_t len = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user