feat(middleware): add sunset/deprecation header middleware#844
feat(middleware): add sunset/deprecation header middleware#844pkieltyka merged 3 commits intogo-chi:masterfrom
Conversation
VojtechVitek
left a comment
There was a problem hiding this comment.
LGTM.
I think this is useful, especially since these headers are defined in RFC8594 - https://www.rfc-editor.org/rfc/rfc8594.html.
Let's see if @pkieltyka agrees this can be merged into github.com/go-chi/chi/v5/middleware :)
Respect previously added links as this header can be used by other components
|
thanks for the PR @thedevsaddam and thanks for reviewing @VojtechVitek |
Thank you so much for this amazing package! |
|
Pardon my curiosity - I saw this PR while browsing through the changelog. I see that RFC 8594 defines the "Sunset" header but makes no mention of the "Deprecation" header. I did find this IETF draft which mentions the "Deprecation" header but it seems to serve a slightly different purpose:
There is also mention of the Sunset header, which uses a different time format:
This PR returns both headers set to the same time and format: Perhaps the |
This PR will include a
Sunsetmiddleware which can be used to deprecate an endpoint or a group of endpoints.For additional information please go through the LINK
Example usages