我在Nginx之上有一个在Passenger上运行的RoR应用程序。 我正在使用devise我的身份validation方法,并有一个链接,通过电子邮件发送给需要身份validation才能查看的用户。
如果用户从Outlook中单击链接,并且IE是默认浏览器,则IE使用以下标头发出HTTP请求:
GET http://www.company.com/custom_layouts/108 HTTP/1.1 Accept: */* Accept-Language: en-us User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E) Accept-Encoding: gzip, deflate Connection: Keep-Alive Host: www.company.com
返回:
HTTP / 1.1 401 Unauthorized Content-Type: / ; charset = utf-8传输编码:分块连接:保持活动状态:401 X-Powered-By:Phusion Passenger(mod_rails / mod_rack)2.2.15 WWW-Authenticate:Basic realm =“Application”Cache-Control:no-cachingX-UA-Compatible:IE = Edge,chrome = 1 Set-Cookie:_vxwer_session = [sessionstr]; path= /; HttpOnly X-Runtime:0.011918服务器:nginx / 0.7.67 + Phusion Passenger 2.2.15(mod_rails / mod_rack)
- 在虚拟networking后面服务
- 在Windows上的Apache2,VirtualHost似乎无法正常工作
- 如果服务器返回caching控制=公共没有最大年龄或过期,可以代理caching它永远吗?
- 可用性监测服务,检查间隔低
- 必要的http头确保cloudfront分布式文件不会被浏览器caching
31在继续之前,您需要login或注册。 0
当地址栏中input完全相同的URL时,它会这样做:
GET http://www.company.com/custom_layouts/108 HTTP/1.1 Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Accept-Language: en-US User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E) Accept-Encoding: gzip, deflate Connection: Keep-Alive Host: www.company.com
返回:
HTTP/1.1 302 Found Content-Type: text/html; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Status: 302 X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 2.2.15 Location: http://www.company.com/users/sign_in Cache-Control: no-cache X-UA-Compatible: IE=Edge,chrome=1 Set-Cookie: _xswer_session=[session_info_here]; path=/; HttpOnly X-Runtime: 0.010798 Server: nginx/0.7.67 + Phusion Passenger 2.2.15 (mod_rails/mod_rack) 6f <html><body>You are being <a href="http://www.company.com/users/sign_in">redirected</a>.</body></html> 0
我希望他们无论如何都会返回相同的东西。
看看下面的devise源代码,这与navigational_formats有关。
我遇到了同样的问题,你描述和设置
config.navigational_formats = [:"*/*", :html]
在devise初始值设定项中为我解决。 我还没有想法,为什么来自Outlook的IE请求传递为/ 。