summaryrefslogtreecommitdiff
path: root/ubus.c
diff options
context:
space:
mode:
Diffstat (limited to 'ubus.c')
-rw-r--r--ubus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ubus.c b/ubus.c
index 1cf5c5f..39b38b2 100644
--- a/ubus.c
+++ b/ubus.c
@@ -164,7 +164,7 @@ static void uh_ubus_add_cors_headers(struct client *cl)
{
char *hdr = (char *) blobmsg_data(tb[HDR_ACCESS_CONTROL_REQUEST_METHOD]);
- if (strcmp(hdr, "POST") && strcmp(hdr, "OPTIONS"))
+ if (strcmp(hdr, "GET") && strcmp(hdr, "POST") && strcmp(hdr, "OPTIONS"))
return;
}
@@ -175,7 +175,7 @@ static void uh_ubus_add_cors_headers(struct client *cl)
ustream_printf(cl->us, "Access-Control-Allow-Headers: %s\r\n",
blobmsg_get_string(tb[HDR_ACCESS_CONTROL_REQUEST_HEADERS]));
- ustream_printf(cl->us, "Access-Control-Allow-Methods: POST, OPTIONS\r\n");
+ ustream_printf(cl->us, "Access-Control-Allow-Methods: GET, POST, OPTIONS\r\n");
ustream_printf(cl->us, "Access-Control-Allow-Credentials: true\r\n");
}