Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(router): move some declarations into local scope #12014

Merged
merged 3 commits into from
Nov 16, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions kong/router/utils.lua
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
local constants = require("kong.constants")
local hostname_type = require("kong.tools.utils").hostname_type
local normalize = require("kong.tools.uri").normalize
local yield = require("kong.tools.yield").yield


local type = type
local type = type
local error = error
local find = string.find
local sub = string.sub
local byte = string.byte
local get_phase = ngx.get_phase


local SLASH = byte("/")

Expand Down Expand Up @@ -251,7 +250,9 @@ local phonehome_statistics
do
local reports = require("kong.reports")
local nkeys = require("table.nkeys")
local yield = require("kong.tools.yield").yield
local worker_id = ngx.worker.id
local get_phase = ngx.get_phase

local TILDE = byte("~")
is_regex_magic = function(path)
Expand Down