Encounter errors tp add pre-function plugins with lua script content. Syntax check failed.
nighteblis opened this issue · 0 comments
Issue summary
Encounter errors tp add pre-function plugins with lua script content. Syntax check failed.
Your environment
Kong node: http://kong:50001 v0.14.1 — Kong-Dashboard v3.5.0
Docker Env:
Client:
Version: 17.09.0-ce
API version: 1.32
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:41:23 2017
OS/Arch: linux/amd64
Server:
Version: 17.09.0-ce
API version: 1.32 (minimum version 1.12)
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:42:49 2017
OS/Arch: linux/amd64
Experimental: false
Issue description
Steps:
- add service
- add route
- add plugins on route
a. pre-function
b. return kong.response.exit(401,"error")
Check failed with giving the message "Error parsing pre-function #1: [string "return kong.response.exit(401"]:1: ')' expected near ''" , that can not add.
Expected behavior
I could add the plugins by using the admin api.