Skip to content

style(conf_loader): minor code style clean #13199

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

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all 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
11 changes: 6 additions & 5 deletions kong/conf_loader/parse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ local nginx_signals = require "kong.cmd.utils.nginx_signals"
local conf_constants = require "kong.conf_loader.constants"
local tools_system = require "kong.tools.system" -- for unit-testing
local tools_ip = require "kong.tools.ip"
local tools_string = require "kong.tools.string"


local normalize_ip = tools_ip.normalize_ip
local is_valid_ip_or_cidr = tools_ip.is_valid_ip_or_cidr
local try_decode_base64 = require("kong.tools.string").try_decode_base64
local strip = require("kong.tools.string").strip
local split = require("kong.tools.string").split
local try_decode_base64 = tools_string.try_decode_base64
local strip = tools_string.strip
local split = tools_string.split
local cycle_aware_deep_copy = require("kong.tools.table").cycle_aware_deep_copy
local is_valid_uuid = require("kong.tools.uuid").is_valid_uuid

Expand Down Expand Up @@ -230,7 +231,7 @@ local function check_and_parse(conf, opts)

elseif v_schema.enum and not tablex.find(v_schema.enum, value) then
errors[#errors + 1] = fmt("%s has an invalid value: '%s' (%s)", k,
tostring(value), concat(v_schema.enum, ", "))
tostring(value), concat(v_schema.enum, ", "))

end

Expand Down Expand Up @@ -442,7 +443,7 @@ local function check_and_parse(conf, opts)
"nginx_stream_lua_ssl_conf_command"}) do

if conf[key] then
local _, _, seclevel = string.find(conf[key], "@SECLEVEL=(%d+)")
local _, _, seclevel = find(conf[key], "@SECLEVEL=(%d+)")
if seclevel ~= "0" then
ngx.log(ngx.WARN, key, ": Default @SECLEVEL=0 overridden, TLSv1.1 unavailable")
end
Expand Down
Loading