开发者

How to get Url Port for Rails instance without request/response loop?

开发者 https://www.devze.com 2023-04-06 00:32 出处:网络
Is there a way to get the url/port that the current rails app is running on without using the http 开发者_如何学JAVArequest/response loop?

Is there a way to get the url/port that the current rails app is running on without using the http 开发者_如何学JAVArequest/response loop?

Or a way to invoke a request to self from within a rails app that will spawn the correct request object to get the url/port?


env["SERVER_PORT"]

Would using this environment variable work?

0

精彩评论

暂无评论...
验证码 换一张
取 消