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

Infinite redirects with Cloudflare, S3, and Heroku SSL interactions #2

Open
bmann opened this issue May 11, 2019 · 0 comments

Comments

@bmann
Copy link
Owner

commented May 11, 2019

If you are using Cloudflare for your custom domains, and you’re using S3 with a Cloudflare hosted subdomain, and Heroku has a custom domain set with SSL turned on, your blog won’t load because of infinite redirects.

For https support for S3 buckets (e.g. s3subdomain.example.com pointing to s3subdomain.example.com.s3.amazon.com), Cloudflare SSL setting must be “Flexible”: Cloudflare makes http requests to s3subdomain.example.com and then serves up over https.

Because Flexible is set, Cloudflare makes http requests to ghostblog.example.com which is set on Heroku and Heroku by default sets up an SSL certificate and will redirect http requests to https, which causes infinite redirects.

Solution:

  • turn off Cloudflare proxying for your custom domain ghostblog.example.com
  • turn off SSL on Heroku

Neither of these are ideal, and is ONLY the case because you need to keep Flexible turned on to get https serving of S3 bucket subdomain (which you’re doing with Cloudflare because Amazon’s Cloudfront takes 53 steps to setup).

More reading on Cloudflare plus Heroku and Full SSL / Full SSL (Strict) is here https://www.viget.com/articles/heroku-cloudflare-the-right-way/

@bmann bmann added the Documentation label May 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.