-
Notifications
You must be signed in to change notification settings - Fork 40
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
Follow redirects in GitHubPages::HealthCheck#served_by_pages? #13
Conversation
An apex domain using A records will sometimes return a 302 Found response, which redirects to the same location.
It looks like it doesn't actually follow the redirect, but instead requests the same URL again. That should be OK in this case, since it ends up making the same request. 👍 |
@spraints Yes, correct. I have run |
Nice catch. 👍 |
This repository is public. IIRC our CI will not run for public repositories. Maybe we should set up a travis CI build for this? |
Follow redirects in GitHubPages::HealthCheck#served_by_pages?
When the Gem was released it was when we were testing some of the new Org Oauth Whitelisting which is now public. There was a hiccup with Travis's ability to properly setup the webhook. Looks like it's live now. Thanks @jdennes! |
Many apex domains like http://getbootstrap.com/ use A records (rather than ALIAS/ANAME records):
GitHub Pages will sometimes respond with a
302 Found
for these domains:Previously the GitHubPages::HealthCheck#served_by_pages? check could fail because it would make a request which would respond with a
302 Found
and theServer: github.com
header wouldn't be included in the response.This fixes the issue by retrying the request, which should then result in a
200 OK
response which includes theServer: github.com
header./cc @benbalter