Req:header("host") might work. There may be the occasional HTTP request that excludes the Host header though.
--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/257babd2-500b-46a9-8d3b-9cbe176275d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Req:header("host") might work. There may be the occasional HTTP request that excludes the Host header though.
On 17 Apr 2015 7:02 am, "Dmitry Polyanovsky" <dmitry.po...@gmail.com> wrote:
Hi all,--
let's say I need to provide absolute URLs in some cases and I want to support all hostnames I listen to
domain.com
www.domain.com
https://domain.com
and even domain.net
I can get protocol with Req:protocol() or Req:header("x-forwarded-proto") if there nginx behind.
But there is no Req:host() or something. Any ideas?
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss+unsubscribe@googlegroups.com.
tnx!
actually, after cup of coffee I got same idea. Sometimes obvious things are not so clear.
btw, cowboy has such function, but simple bridge doesn't
On Thursday, April 16, 2015 at 10:04:52 PM UTC+3, Tim McNamara wrote:
Req:header("host") might work. There may be the occasional HTTP request that excludes the Host header though.
On 17 Apr 2015 7:02 am, "Dmitry Polyanovsky" <dmitry.po...@gmail.com> wrote:
Hi all,--
let's say I need to provide absolute URLs in some cases and I want to support all hostnames I listen to
domain.com
www.domain.com
https://domain.com
and even domain.net
I can get protocol with Req:protocol() or Req:header("x-forwarded-proto") if there nginx behind.
But there is no Req:host() or something. Any ideas?
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/257babd2-500b-46a9-8d3b-9cbe176275d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/c075f2ef-e2a5-43d7-b931-831979c75e87%40googlegroups.com.