我的代码使用选项请求而不是 get 进行重定向,这可能是什么原因造成的?
重定向来自这里:
def destroy
sign_out
redirect_to "#{YAML.load_file("#{Rails.root}/config/sso.yml")[Rails.env]["provider_url"]}/logout?redirect=#{root_url}", allow_other_host: true
end
在另一个应用程序上返回此错误:
为 ::1 启动选项“/logout?redirect=http://localhost:3009/” 2024-09-18 15:16:29 -0300 ActionController::RoutingError(无路由 匹配[选项]“/注销”):
Rails 7.0.8.4 红宝石 2.7.8p225