kong
kong copied to clipboard
fix(proxy-cache): changes age param
Summary
The age parameter on the schema was in lower case which caused the header Age to appear only when the kong debug option was enabled. This commit changes the schema parameter from age to Age.
Checklist
- [x] The Pull Request has tests
- [X] A changelog file has been created under
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.md - [ ] There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE
Issue reference
Fix #12787
Thanks for your contribution @joelact. While a headers are case-insensitive according to the RFC it's a contention to have them Title-cased.
Your change includes a schema change, which requires additional steps to ensure backwards compatibility with older Kong versions. If you choose to follow-up on those, I'm happy to assist you in doing so. Alternatively, we'll pick up the PR and continue from here. Up to you @joelact
Hey @jschmid1. Thanks for taking a look at this. I want to continue working on this PR so can you tell me the next steps to get this going?
Sure @joelact, Your change qualifies as a "rename" of a field. To ensure compatibility to older versions when running Kong in hybrid-mode you have to teach the Kong how to manipulate the plugin config so that older versions still understand it.
You can take a look at the compatibility checkers here -> https://github.com/Kong/kong/blob/master/kong/clustering/compat/checkers.lua
and for testing check this file -> https://github.com/Kong/kong/blob/master/spec/02-integration/09-hybrid_mode/09-config-compat_spec.lua
Hey @jschmid1! Sorry for the delay in completing the mentioned actions. When possible can you review this again?