Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Add /ping endpoint #30

Merged
merged 2 commits into from
Oct 17, 2014
Merged

Add /ping endpoint #30

merged 2 commits into from
Oct 17, 2014

Conversation

jswank
Copy link
Contributor

@jswank jswank commented Oct 14, 2014

Created a simple /ping endpoint for health checks.

@@ -192,6 +193,11 @@ func (p *OauthProxy) SetCookie(rw http.ResponseWriter, req *http.Request, val st
http.SetCookie(rw, cookie)
}

func (p *OauthProxy) PingPage(rw http.ResponseWriter) {
rw.WriteHeader(http.StatusOK)
fmt.Fprintf(rw, "pong")
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind switching this return "OK"? (That's the string we use on all of our Bitly projects)

@jehiah
Copy link
Member

jehiah commented Oct 14, 2014

@jswank aside from the small comment, great idea!

@jswank
Copy link
Contributor Author

jswank commented Oct 16, 2014

The /ping endpoint now responds with "OK"

jehiah added a commit that referenced this pull request Oct 17, 2014
@jehiah jehiah merged commit cfad6ac into bitly:master Oct 17, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants