mirror of
https://github.com/bjc/prosody.git
synced 2025-04-01 20:27:39 +03:00
mod_http: Fix error if 'access_control_allow_origins' is set
Because it changes the type of the 'opt_origins' variable from util.set to the internal _items table so next time an http app is added an error "attempt to call a nil value (method 'empty')" is triggered. The value is not used anywhere else. Noticed when reviewing uses of the '_items' set property. Not reported by any users, implying this setting is rarely used.
This commit is contained in:
parent
cbed7dfdf5
commit
960f406662
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ function module.add_host(module)
|
|||
local app_credentials = opt_credentials;
|
||||
local app_origins;
|
||||
if opt_origins and not (opt_origins:empty() or opt_origins:contains("*")) then
|
||||
opt_origins = opt_origins._items;
|
||||
app_origins = opt_origins._items;
|
||||
end
|
||||
|
||||
local function cors_handler(event_data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue