gpt4 book ai didi

ruby-on-rails - force_ssl 导致永无止境的重定向

转载 作者:太空宇宙 更新时间:2023-11-03 12:57:01 34 4
gpt4 key购买 nike

rails 3.1.3

有了 force_ssl,我一遍又一遍地得到这个重定向,它永远不会结束。我要去 https 网址,所以我不确定为什么它会提示。想法?

Started GET "/app/admin/calendar" for 69.64.227.254 at 2012-02-13 19:52:44 +0000
Processing by Admin::CalendarsController#show as HTML
User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = 21 ORDER BY lower(first) ASC LIMIT 1
Account Load (0.6ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = 23 AND (accounts.deleted_at IS NULL) LIMIT 1
Redirected to https://www.mydomain.net/app/admin/calendar
Completed 301 Moved Permanently in 4ms

最佳答案

在这里回答:Why am I getting infinite redirect loop with force_ssl in my Rails app?

剧透:将此添加到您的 nginx 配置文件中:

proxy_set_header X-Forwarded-Proto $scheme;

关于ruby-on-rails - force_ssl 导致永无止境的重定向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9267748/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com