简体   繁体   English

Ruby on Rails:RestAuth:如何使用HTTPS注销?

[英]Ruby on Rails: RestAuth: how do I log out using HTTPS?

<%= link_to("Log Out", session_url, :method => :delete) %>

When I am on a non https page logging out works fine. 当我在非https页面上时,注销正常。

But the issue is when I am on an https page, the above code throws an error 但是问题是当我在https页面上时,上面的代码引发了错误

Parameters: {"action"=>"show", "controller"=>"sessions"}

ActionController::UnknownAction (No action responded to show. Actions: create, destroy, forgot, reset, and set_time_zone):

I tried changing session_url to new_session_url, but then I got an error saying only GET requests were allowed 我尝试将session_url更改为new_session_url,但随后出现错误消息,仅允许GET请求

Any idea how to fix the problem? 任何想法如何解决该问题?

您是否看过以下问题: 在RESTFUL身份验证中添加注销按钮

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM