Skip to content
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

feat(core) handle native 400 response codes #2476

Merged
merged 1 commit into from
May 2, 2017
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions kong/core/error_handlers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ local xml_template = '<?xml version="1.0" encoding="UTF-8"?>\n<error><message>%s
local html_template = '<html><head><title>Kong Error</title></head><body><h1>Kong Error</h1><p>%s.</p></body></html>'

local BODIES = {
s400 = "Bad request",
s404 = "Not found",
s408 = "Request timeout",
s411 = "Length required",
Expand Down
2 changes: 1 addition & 1 deletion kong/templates/nginx_kong.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ server {
> else
listen ${{PROXY_LISTEN}};
> end
error_page 404 408 411 412 413 414 417 /kong_error_handler;
error_page 400 404 408 411 412 413 414 417 /kong_error_handler;
error_page 500 502 503 504 /kong_error_handler;

access_log logs/access.log;
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/custom_nginx.template
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ http {
> else
listen ${{PROXY_LISTEN}};
> end
error_page 404 408 411 412 413 414 417 /kong_error_handler;
error_page 400 404 408 411 412 413 414 417 /kong_error_handler;
error_page 500 502 503 504 /kong_error_handler;

access_log logs/access.log;
Expand Down