facebook - URL 请求了 HTTP 重定向,但无法遵循。 - Facebook/Nginx 问题

标签 facebook nginx

我使用 Facebook 的共享调试器来突出显示网站上的问题

URL requested a HTTP redirect, but it could not be followed.

https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Fwww.badgerbookings.com

这也阻止了它在创建应用程序时接受隐私政策中的 url。 enter image description here

我已经研究并确保添加所有 OG 元标记。我还“减少”了我的 nginx 上的重定向,只支持 http > https 重定向,这对我来说似乎很标准。

它仍然会在调试器和隐私政策 URL 上产生错误。

我的 Nginx 配置:

server_tokens off; #Enables or disables emitting nginx version on error pages and in the “Server” response header field

map $http_upgrade $connection_upgrade {
        default upgrade;
        '' close;
}

server {
    listen 80;
    server_name _;
    return 301 https://www.badgerbookings.com$request_uri;
}

server {
        server_name www.badgerbookings.com  badgerbookings.com *.badgerbookings.com;

        location / {
            proxy_pass http://localhost:3000;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade; # allow websockets
                proxy_set_header Connection $connection_upgrade;
                proxy_set_header X-Forwarded-For $remote_addr; # preserve client IP
                proxy_set_header Host $http_host;
                proxy_set_header X-Forward-Proto http;
                proxy_set_header X-Nginx-Proxy true;
         }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/badgerbookings.com-0001/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/badgerbookings.com-0001/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

最佳答案

转到 Facebook Developer's policy页面。

向下滚动到这一点:

Privacy Policy

a. Provide a publicly available and easily accessible privacy policy that explains what data you are collecting and how you will use that data.

现在运行

curl https://badgerbookings.com/terms

您是否正在查看可在该 URL 上公开获得的易于访问的隐私政策?

关于facebook - URL 请求了 HTTP 重定向,但无法遵循。 - Facebook/Nginx 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51956092/

相关文章:

javascript - 在悬停时显示 facebook 和 twitter 关注按钮

javascript - 使用 facebook 批量请求 javascript api

android - 如何使用数字用户 ID 在 Android 应用程序中打开 Facebook 个人资料

php - 如何排除其中的目录和文件 - 重写

nginx - 如何在 Nginx 中使用 Porkbun SSL 证书文件?

c# - Facebook C# 库

javascript - 无法使用 jQuery(Chrome 扩展)选择某些 Facebook 类

Docker-nginx-反向代理: host not found in upstream when building with docker-compose

amazon-web-services - 将环境变量添加到 NodeJS Elastic Beanstalk 时出错

nginx - 将查询字符串重写为路径参数