Yeah, simple bridge doesn't provide a built-in host() function, mostly
because header(host) always felt sufficient.

I'm not entirely sure if I'm opposed to adding a host() function, if
only to keep the number of exported functions down to the bare
minimum. But maybe I can be convinced!

(BTW, sometime this summer, I should find the time to finally upgrade
CB to SimpleBridge 2.0).

:)

On Thu, Apr 16, 2015 at 2:33 PM, Dmitry Polyanovsky
<[email protected]> wrote:
> 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"
>> <[email protected]> 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 [email protected].
>>> 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 [email protected].
> 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.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

-- 
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 [email protected].
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/CAPTXyXcPWBdF4VedJsO%3D6vdT4bcNfuDbS5ySfxPr-Lhqc48c6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to