A user, simonb, reports that their Medium blog posts on a custom subdomain are failing to onebox on their forum. Falco identifies the issue as inconsistent HTTP responses between GET and HEAD requests, which breaks the onebox process. simonb consults Medium support, who request the User-Agent header used by onebox. Falco confirms the issue is due to a bug with handling 307 redirects and shares a fix in a pull request. jamie.wilson confirms the fix has been deployed, and simonb thanks the team, noting they can now edit their posts.
If I issue a GET to this URL I get a sequence of redirects:
GET → 307 → 302 → 200
However, if I issue a HEAD I get a 200 straight away
HEAD → 200
The way our onebox works is that we try to handle all the redirection dance with a HEAD request first, and pass the already resolved URL and the necessary cookies to the oneboxer engine.
Since your setup is doing different responses for each, this breaks onebox. It’s also quite bad for perfomance when the canonical URL for the article is always two redirects away from rendering, so you may want to fix that.