ngauthier/tubesock

Nginx return 401 Unauthorized when using devise before_action

Karthik-Y opened this issue · 1 comments

This problem occurs when using devise in conjunction with tubesock. The before_action is used in the application controller for a central control of the app. Commenting it out everything works else we end up with 401 on any page even though user is logged in.

Setup.
Nginx, puma, rails 4.2.3

It was a little too quick to raise this issue I think, it was not the gem causing the issue. It was a routing error between http:80 and ssl:443 the server was sending mixed contents on logging out from app from ssl which was directed to http:80 and causing the nginx error. So a proper redirect of server solved this issue.