Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我开发了一个 Catalyst 应用程序,它通过 Catalyst 开发服务器运行,例如localhost:3000. http://myhost/myapp/接下来,我将 Apache 配置为localhost:3000使用 mod_proxy代理请求。
localhost:3000
http://myhost/myapp/
我现在希望 Catalyst 知道它已公开重新定位到基本 url myapp/,并在通过uri_for.
myapp/
uri_for
我该怎么做?
KT,最简单的做法是安装Catalyst::TraitFor::Request::ProxyBase,因为它专门设计用于将请求库替换为 HTTP 代理传递的值。
Catalyst::TraitFor::Request::ProxyBase
该模块是完全透明的,不需要修改现有的应用程序。