feat: add last modified and digest metadata to standalone API#12526
Merged
bzp2010 merged 8 commits intoAug 18, 2025
Conversation
bzp2010
marked this pull request as ready for review
August 14, 2025 20:50
Member
|
Please fix the errors reported in the CI. |
bzp2010
requested review from
AlinsRan,
Revolyssup,
SkyeYoung,
membphis,
moonming,
nic-6443 and
ronething
August 15, 2025 06:54
nic-6443
approved these changes
Aug 18, 2025
AlinsRan
reviewed
Aug 18, 2025
AlinsRan
approved these changes
Aug 18, 2025
membphis
reviewed
Aug 18, 2025
membphis
approved these changes
Aug 18, 2025
jizhuozhi
pushed a commit
to jizhuozhi/apisix
that referenced
this pull request
Oct 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add a new metadata response header to the Standalone API. This includes
X-Last-ModifiedandX-Digest.They are used to report to a cluster of multiple APISIX instances, which instance was last updated, and the configuration digest currently in use.
The
X-Digestis passed in by thePUTrequest and recorded in memory, and then output in the response header of aGETorHEADrequest. This value is transparent to APISIX, which does not parse or generate the value in any way; it is completely controlled by the client. There is a simple judgment here; if the digest input for the PUT request matches what is currently stored in memory, the API will return 204, and the configuration update will not actually occur.Add support for the
HEADmethod, which returns only metadata but not configuration.Checklist
I explicitly point out that this is not backwards compatible. Since this feature is clearly marked as experimental and users have been warned not to rely on it, we can comfortably make the changes we need.