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(http-log) add custom header for authorization #6449
Conversation
2b988d3
to
8158e57
Compare
8e7c791
to
97e752a
Compare
Should it allow plural? Aka custom headers? |
@bungle I asked the same question in #6449 (comment). I guess there is little use case for people adding two statistically defined headers, so I tends to agree this current implementation should satisfies more than 90% of the use cases out there. In particular, for authenticating against a log collection API, one set of header is usually enough. Whether it is If we support templating for header values then supporting more than one custom header may be more useful. |
@dndx @bungle if using this; https://github.com/Kong/kong/blob/next/kong/db/schema/typedefs.lua#L509 do you have an example of where/how it is to be used? |
had a look at it, that is not suitable. That headers typedef only checks for "Host", and doesn't allow it. kong/kong/plugins/http-log/handler.lua Lines 85 to 87 in 612c365
That is really overkill for such a simple feature. |
I really think this is overcomplicating it. |
4c467a3
to
818bfe7
Compare
the typedef for `headers` was custom to the `route` entity, now separated out properly
32e301d
to
32c7cfb
Compare
Adds an option to provide a custom header, and value to add to the log request. Typically required for Splunk for example.