Ruby-on-Rails: How to get rid of “you are being redirected” page

前端 未结 4 634
孤街浪徒
孤街浪徒 2021-01-01 13:00

I am overriding Devise\'s failure response so that I can set a 401 status code. However, when the user fails to sign in, they are redirected to a page with a \"you are being

4条回答
  •  南方客
    南方客 (楼主)
    2021-01-01 13:37

    I was actually running into this problem on our QA server, but not locally. It turned out that our memcache was intercepting the message and rendering it as a 200, and causing this message to appear. This was due indirectly to our memcache settings which didn't expect a re-direct from a GET.

    From: 
    $document_root/cache/$uri.html /cache/$uri /cache/$uri.html $uri @memcached
    
    To:
    $document_root/cache/$uri.html /cache/$uri /cache/$uri.html $uri @rails
    

提交回复
热议问题