-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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(conf): inject nginx directives into kong's proxy location block #11623
feat(conf): inject nginx directives into kong's proxy location block #11623
Conversation
|
20b3033
to
350b432
Compare
7b9ebe5
to
80b6fd7
Compare
We also have indirection, e.g.: Thus I am not totally sure about this. @vvicaretti what are the reasons that you need to use custom template? |
@bungle since these are internal locations, I figured there is less need for end users to inject Nginx directives there. To expand a bit on the specific use case: An application sets an
That's currently not possible, unless we use a custom template which makes upgrades tricky |
Those internal locations get used if you for example:
So while they are internal, I feel we need to think wether we want the same directives replicated on each, or have their own injections. |
I believe it is up to the maintainers to decide what's the best way forward. |
8318c1f
to
7e17d1f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the nice contribution @vvicaretti. We had a look at this and this should be fine. I started the tests to see if anything breaks 👍🏼
`nginx_location_*`: the new prefix allows for the dynamic injection of Nginx directives into the `/` location block within Kong's Proxy server block.
7e17d1f
to
d1e177b
Compare
I have pushed this commit d1e177b to include a changelog file (the test was failing). I am afraid tests will have to be triggered one more time :) |
Summary
The injection of Nginx directives is currently supported in the
http
andserver
contexts, but not in thelocation
context.To inject Nginx directives into the
location
context, it is required to create and maintain a custom Nginx template, as detailed in this document.The goal is to enable injection of Nginx location directives into the Kong Gateway’s proxy block, following the same pattern used for
http
andserver
contexts, without the need of a custom Nginx template.This would streamline the process and maintain consistency across different Kong Gateway’s proxy contexts.
Checklist
CHANGELOG/unreleased/kong
or addingskip-changelog
label on PR if unnecessary. README.mdFull changelog
nginx_location_*
. The new prefix allows for the dynamic injection of Nginx directives into the/
location block within Kong's proxyserver {}
block.Issue reference
Fix #[issue number]