Skip to content

Commit

Permalink
feat: fetch priority from environment if present else set to default …
Browse files Browse the repository at this point in the history
…value (#51)
  • Loading branch information
krishna-raj007-d11 authored Nov 16, 2021
1 parent a0a0b21 commit 57aad6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kong/plugins/host-interpolate-by-header/handler.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
local HostInterpolateByHeaderHandler = {}

HostInterpolateByHeaderHandler.PRIORITY = 810
HostInterpolateByHeaderHandler.VERSION = "1.0.0"
HostInterpolateByHeaderHandler.PRIORITY = tonumber(os.getenv("PRIORITY_HOST_INTERPOLATE_BY_HEADER")) or 810
kong.log.info("Plugin priority set to " .. HostInterpolateByHeaderHandler.PRIORITY ..
(os.getenv("PRIORITY_HOST_INTERPOLATE_BY_HEADER") and " from env" or " by default"))


local function interpolate_header(host, _header, header_val, conf)
Expand Down

0 comments on commit 57aad6e

Please sign in to comment.