从excel到rails服务器的链接运行设备无法正常工作

时间:2015-06-14 19:49:35

标签: excel ruby-on-rails-4 devise

(rails 4,ruby 2.0,excel for osx 14.5,但在windows excel中检测到同样的问题) 我在excel中有一个链接,如下所示:

https://www.example.com/reports/download_frame/1481

当用户点击excel时,他们会被路由到默认主页。 当他们将相同的网址剪切并粘贴到浏览器中时,它可以正常工作,然后直接进入页面。

在apache上,这就是日志的样子:

- - - [14/Jun/2015:15:41:44 -0400] "OPTIONS /reports/download_frame/ HTTP/1.1" 404 1564 "-" "Microsoft Office Protocol Discovery" -
- - - [14/Jun/2015:15:41:45 -0400] "GET /reports/download_frame/1481 HTTP/1.1" 302 106 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X) Excel/14.50.0" -
- - - [14/Jun/2015:15:41:45 -0400] "GET /users/sign_in HTTP/1.1" 200 4148 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X) Excel/14.50.0" -
- - - [14/Jun/2015:15:41:46 -0400] "GET /users/sign_in HTTP/1.1" 302 93 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Firefox/38.0" -
- - - [14/Jun/2015:15:41:46 -0400] "GET / HTTP/1.1" 200 6772 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Firefox/38.0" -

我不确定第一个电话是做什么的,但第二个应该是正确的。似乎设计是自动登录它们,但忘记了原始网址。如果他们已经登录,那么它不应该只是第一次尝试吗?

2 个答案:

答案 0 :(得分:0)

使用rememberable设计模块记住用户连接时的情况。

请查看此处的文档:http://www.rubydoc.info/github/plataformatec/devise/master/Devise/Models/Rememberable

答案 1 :(得分:0)

I found this after I posted, worded differently, but same issue, the first answer was a workaround to my problem.

Excel links not loading pages, but when the link is pasted in the browser it works.