-
Notifications
You must be signed in to change notification settings - Fork 4.9k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Being able to customize the upstream proxy errors #972
Comments
Also the default |
This would make sense, I'm just starting to use Kong and really surprised to not see this functionality at all! |
I was trying to work around this with:
but it seems to have no effect. |
The error I am trying to customize is the 403 coming from the |
For anyone trying to do the same: I needed to add:
to the Nginx configuration for upstream errors to be passed to Instead, 40x produced by a plugin (like |
(Possibly) traced the problem to the lua module, asking there: openresty/lua-nginx-module#875 |
@thefosk Is there some news about this feature? |
@arno-di-loreto we want to introduce this capability but currently we have other priorities. The only way today is to fork the plugins and change the message manually - but we want to provide an easier way. |
Hey @thefosk @Tieske @thibaultcha |
Hi, any news about this? If not, anyone would be able to point out a fork with some progress about it? |
@tetebueno there is a hack that we did. Overriding the kong.tools.response file. |
Hi @mwaaas , we are after this feature too, can you please tell us how you changed kong.tools.response? |
Hi, anyone got a working sample for achieving this, customising the error message? appreciate any help thanks |
@takearun created a folder called kong/tools and added response file to the directory, then added my directory to the lua path, in that way when Kong tries to import kong.tools.response it would import my file. Let me know if that helps. |
Is this implemented yet ? |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Being able to customize the upstream error responses being returned by
proxy_pass
, by allowing to override the current templates.The user would need to provide their own templates for all the response formats that we support.
The text was updated successfully, but these errors were encountered: