Skip to content

Commit 0db2b2e

Browse files
committed
Small optimization to reuse variable.
1 parent b3c39c1 commit 0db2b2e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/api-umbrella/utils/active_config_store/cache_computed_api_backend.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ local function cache_scheduled_brownouts(config, api)
1717
local frontend_host_normalized = api["_frontend_host_normalized"]
1818
for _, host in ipairs(hosts) do
1919
local scheduled_brownouts = host["scheduled_brownouts"]
20-
if scheduled_brownouts and (api["_frontend_host_normalized"] == host["_hostname_normalized"] or matches_hostname(frontend_host_normalized, host["_hostname_normalized"], host["_hostname_wildcard_regex"])) then
20+
if scheduled_brownouts and (frontend_host_normalized == host["_hostname_normalized"] or matches_hostname(frontend_host_normalized, host["_hostname_normalized"], host["_hostname_wildcard_regex"])) then
2121
if api["_scheduled_brownouts"] == nil then
2222
api["_scheduled_brownouts"] = {}
2323
end

0 commit comments

Comments
 (0)