Skip to content

Commit fbc0117

Browse files
committed
fix: plugin works - test http 400 response
1 parent 8b2bf60 commit fbc0117

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

k8s/kong-plugin-auth.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ metadata:
66
config:
77
access:
88
- |
9-
kong.log("Executing Auth Plugin.")
10-
local http = require "resty.http"
11-
local req = kong.request
9+
kong.log.info("Executing Auth Plugin.")
1210
13-
local user_id = req.get_header("X-User-ID")
11+
local user_id = kong.request.get_header("X-User-ID")
1412
if not user_id then
1513
kong.log.err("Missing X-User-ID header")
1614
return kong.response.exit(400, { message = "Missing user ID" })

0 commit comments

Comments
 (0)