Fix error with multisite variables when requesting default server

This commit is contained in:
Théophile Diot 2023-06-12 08:23:28 -04:00
parent f81b0bb4da
commit 70f227feb3
No known key found for this signature in database
GPG Key ID: E752C80DB72BB014
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ utils.get_variable = function(var, site_search)
end
local value = variables["global"][var]
-- Site search case
local multisite = site_search and variables["global"]["MULTISITE"] == "yes" and ngx.var.server_name
local multisite = site_search and variables["global"]["MULTISITE"] == "yes" and ngx.var.server_name ~= "_"
if multisite then
value = variables[ngx.var.server_name][var]
end