gpt4 book ai didi

ruby-on-rails - Rails : how to get the current host, 或用它构建 URL?

转载 作者:数据小太阳 更新时间:2023-10-29 06:29:31 24 4
gpt4 key购买 nike

<分区>

我需要使用主机构建具有不同端口的 URL。

例如,如果主机是 example.com,我需要生成类似 http://example.com:8080/ 的 URL

我需要它是便携的,所以当我在本地环境中时,它会显示 http://localhost:8080/相反。

有什么想法吗?

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