[erlang-questions] cowboy: dispatch on chrome/firefox vs android/iphone

Barco You barcojie@REDACTED
Sun Apr 13 08:09:59 CEST 2014


No. I think you have to parse the HTTP Header by yourself and then return
corresponding body as "desktop.html" or "mobile.html"

Barco


On Sat, Apr 12, 2014 at 8:48 AM, t x <txrev319@REDACTED> wrote:

> Hi,
>
>   Using cowboy, is there a easy way to, for:
>
>   mysite.com/ serve
>
>   * ~/static/desktop.html if browser = chrome/firefox
>   * ~/static/mobile.html if browser = android/iphone ?
>
>   (Sample code to steal would be ideal; though functions to lookup
> suffices too.)
>
> Thanks!
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140413/47fa271e/attachment.htm>


More information about the erlang-questions mailing list