aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_bosh.lua3
-rw-r--r--plugins/mod_http.lua2
-rw-r--r--plugins/mod_http_file_share.lua1
-rw-r--r--plugins/mod_websocket.lua3
4 files changed, 8 insertions, 1 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index 9f08156c..11bfb51d 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -547,6 +547,9 @@ function module.add_host(module)
module:depends("http");
module:provides("http", {
default_path = "/http-bind";
+ cors = {
+ enabled = true;
+ };
route = {
["GET"] = GET_response;
["GET /"] = GET_response;
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index ffe6963c..b26adb1c 100644
--- a/plugins/mod_http.lua
+++ b/plugins/mod_http.lua
@@ -163,7 +163,7 @@ function module.add_host(module)
local cors = cors_overrides[app_name] or event.item.cors;
if cors then
- if cors.enabled ~= false then
+ if cors.enabled == true then
if cors.credentials ~= nil then
app_credentials = cors.credentials;
end
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua
index 8e433471..b6200628 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -578,6 +578,7 @@ if not external_base_url then
module:provides("http", {
streaming_uploads = true;
cors = {
+ enabled = true;
credentials = true;
headers = {
Authorization = true;
diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua
index c4f172fc..bddcbb79 100644
--- a/plugins/mod_websocket.lua
+++ b/plugins/mod_websocket.lua
@@ -355,6 +355,9 @@ function module.add_host(module)
module:provides("http", {
name = "websocket";
default_path = "xmpp-websocket";
+ cors = {
+ enabled = true;
+ };
route = {
["GET"] = handle_request;
["GET /"] = handle_request;