gpt4 book ai didi

php - Symfony2 路由器返回端口 80 的绝对 url

转载 作者:搜寻专家 更新时间:2023-10-31 21:36:27 26 4
gpt4 key购买 nike

调用时:

$this->get('router')->generate('...',array(),true) 

为了从 Controller 获取绝对 URL,我获取了默认端口 80 的 URL: https://subdomain.mydomain.com:80

我怎样才能去掉 :80?这只发生在生产中。在我的本地计算机上,我没有获得绝对 URL 中的默认端口。

生产环境使用反向代理(nginx:443->varnish->apache:80)本地apache服务器端口是80,但应该是远程端口443。

最佳答案

关于php - Symfony2 路由器返回端口 80 的绝对 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18294138/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com