Mark Thomas Miller's logo

Heroku HTTP Origin Header didn't match request.base_url

January 4, 2019

If you're seeing a Heroku error such as Cloudflare + Heroku "HTTP Origin header (https://example.com) didn't match request.base_url (http://example.com), it's due to the mix of https and http.

I'm using Cloudflare along with Heroku, so I went to the Crypto tab and set "Flexible" to "Full (Strict)", which fixed the issue. Depending on your setup, your solution may vary.