-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(api schema) better check for request_host
The old check would allow a value of `/hello` as a `request_host`. This change uses a Lua pattern to validate a `request_host` and does so in the `check_request_host` function, removing the need for the `regex` field in schema (not used anywhere else). However, the `regex` schema field capability is not removed by this change. This also slightly improves the checks made on `request_host` and `request_path` and adds many test cases for `rquest_host` validation. Fix Kong#856
- Loading branch information
1 parent
125ef9e
commit 20b141c
Showing
3 changed files
with
138 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters