ngauthier / tubesock

Websocket interface on Rack Hijack w/ Rails support
MIT License
620 stars 43 forks source link

Nginx return 401 Unauthorized when using devise before_action #48

Closed Karthik-Y closed 9 years ago

Karthik-Y commented 9 years ago

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

Karthik-Y commented 9 years ago

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.