【发布时间】:2011-09-11 20:30:29
【问题描述】:
我正在运行带有 PhusionPassenger 和 NGINX 的 Rails 3.1。我通过一个简单的 HttpClient(OS X 的 GraphicalHttpClient)发送请求。我的代码需要标头中的令牌和 ID 来验证调用者的真实性。在开发模式下这没问题,但是一旦我将它投入生产,标题变量就会丢失。什么都没有显示。
代码如下:
@caller = Person.check_authentication_token(request.headers['person_id'], request.headers['authentication_token'])
如果任一变量为 nil,则 check_authentication_token 方法返回 nil。正如我所说,这在开发中运行良好,但 request.headers['person_id'] 和 request.headers['authentication_token'] 在生产中都为零。有其他人以前见过这个问题吗?
【问题讨论】:
标签: ruby-on-rails-3 nginx passenger