How to fix Facebook Circular Redirect?

2020-05-24 19:34发布

I have a page that redirects to another page I'm trying to test my url on: https://developers.facebook.com/tools/debug

I get this error:

Errors That Must Be Fixed:
Circular Redirect:‎ Circular redirect path detected (see Redirect Path section for details).

Warnings That Should Be Fixed:
‎The og:url property should be explicitly provided, even if a value can be inferred from other
tags.‎
  1. How can I fix this problem?
  2. How to detect Facebook and, if it is Facebook, don't redirect?

8条回答
做个烂人
2楼-- · 2020-05-24 20:21

I had the same problem. Hard to notice at first but heroku was redirecting me from domain.heroku.com to domain.herokuapp.com.

Strangely, the cause of the problem was config.action_mailer.default_url_options = { :host => 'mydomain.herokuapp.com' } even though no mailer is involved.

查看更多
男人必须洒脱
3楼-- · 2020-05-24 20:25

In my case it was canonical url was on http and fetched url was on https switching it to https the it fixed my problem.

查看更多
登录 后发表回答