Skip to content
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

Conversation

martinbaillie
Copy link
Contributor

Resolves #1767

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)
Copy link
Member

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) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure @emilevauge. Done.

Copy link
Contributor

@timoreimann timoreimann left a 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.

@martinbaillie martinbaillie force-pushed the feature/martin.baillie-ping-head-request-handler branch from b04722d to c05afe9 Compare June 20, 2017 05:54
@martinbaillie
Copy link
Contributor Author

@timoreimann fixed

Copy link
Contributor

@timoreimann timoreimann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. ☺️

Copy link
Member

@emilevauge emilevauge left a 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.
@ldez ldez force-pushed the feature/martin.baillie-ping-head-request-handler branch from c05afe9 to e0e4775 Compare June 20, 2017 08:35
@ldez ldez merged commit 447109e into traefik:master Jun 20, 2017
@ldez ldez modified the milestone: 1.4 Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api kind/enhancement a new or improved feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants