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
Add HTTP HEAD handling to /ping endpoint #1768
Add HTTP HEAD handling to /ping endpoint #1768
Conversation
server/web.go
Outdated
@@ -84,6 +84,7 @@ func (provider *WebProvider) Provide(configurationChan chan<- types.ConfigMessag | |||
|
|||
// ping route | |||
systemRouter.Methods("GET").Path(provider.Path + "ping").HandlerFunc(provider.getPingHandler) | |||
systemRouter.Methods("HEAD").Path(provider.Path + "ping").HandlerFunc(provider.getPingHandler) |
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.
Could you instead use systemRouter.Methods("GET", "HEAD").Path(provider.Path + "ping").HandlerFunc(provider.getPingHandler)
?
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.
Sure @emilevauge. Done.
576f4ed
to
b04722d
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.
The documentation should also mention the new verb.
b04722d
to
c05afe9
Compare
@timoreimann fixed |
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.
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 @martinbaillie
LGTM
Also updates documentation to reflect new method.
c05afe9
to
e0e4775
Compare
Resolves #1767