【发布时间】:2017-09-08 17:31:33
【问题描述】:
我有一个非常标准的 rails 5.1 应用程序,它安装在我们主域下的子目录下:
https://www.company.com/subir/
这是在 routes.rb 中完成的
scope :subdir
the other routes
end
我在 DMZ 中使用 NGINX 将传入请求传递给我的应用程序服务器:
...
server_name www.company.com;
location /subdir {
proxy_pass https://my-app-server;
}
...
在我的应用服务器上安装了非常常见的 Nginx/Puma 组合,几乎一切正常,除了我通过 actionmailer 发送的电子邮件中的网址。
在我看来,我有一个链接:
link_to 'approve customer', admin_customer_url(@customer)
这将创建以下内容:
https://www.company.com/**subdir/subdir**/admin/customer/:id
在我的本地机器上,这些链接是在我的电子邮件中正确生成的,但不是在我的应用服务器上的暂存环境中。
我将请求对象转储到视图中,以查看我的 nginx 设置是否疯狂,但没有任何明显的疯狂......
有什么想法吗?
【问题讨论】:
标签: ruby-on-rails nginx actionmailer