aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2013-06-11 12:55:47 -0400
committerWaqas Hussain <waqas20@gmail.com>2013-06-11 12:55:47 -0400
commit296d4f627c333063728d6bdedd4ff67568393de4 (patch)
treeba7745fe6c7400b6e66297d30bb335222ac09e12 /plugins
parent08abe5eba3289a2b84ccd4af5c959e443da7e132 (diff)
downloadprosody-296d4f627c333063728d6bdedd4ff67568393de4.tar.gz
prosody-296d4f627c333063728d6bdedd4ff67568393de4.zip
mod_bosh: Reduce a little code.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_bosh.lua8
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index e3a1050b..9a612ae0 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -37,6 +37,7 @@ local bosh_max_wait = module:get_option_number("bosh_max_wait", 120);
local consider_bosh_secure = module:get_option_boolean("consider_bosh_secure");
local cross_domain = module:get_option("cross_domain_bosh", false);
+if cross_domain == true then cross_domain = "*"; end
if type(cross_domain) == "table" then cross_domain = table.concat(cross_domain, ", "); end
local trusted_proxies = module:get_option_set("trusted_proxies", {"127.0.0.1"})._items;
@@ -90,12 +91,7 @@ local function set_cross_domain_headers(response)
headers.access_control_allow_methods = "GET, POST, OPTIONS";
headers.access_control_allow_headers = "Content-Type";
headers.access_control_max_age = "7200";
-
- if cross_domain == true then
- headers.access_control_allow_origin = "*";
- else
- headers.access_control_allow_origin = cross_domain;
- end
+ headers.access_control_allow_origin = cross_domain;
return response;
end