On 1 February 2013 23:32, Robert Snyder <[email protected]> wrote:
[snip]
> I know it cannot be the most efficient thing, but it would allow us to have
> custom redirection that can be maintained by the owners of the backend
> pages.

I've implemented something vaguely similar in nginx, and it was a
pain. Far too much app-level logic embedded in infrastructure-level
configurations. Even if you /could/ do this with HAProxy, I wouldn't.

You say you want the backend to own the redirection - why not simply
make the backend app do 301/302s to your mobile site as appropriate?
At least they're sitting in code there, and can do more complex
user-agent/etc evaluation using a real language, instead of trying to
bastardise HAProxy's non-procedural config language into doing it for
you.

And if you're concerned about your default, non-special-case mobile
redirect being a burden you don't want to impose on multiple backend
owners, I'd merely suggest to you that it would be a very poor backend
web framework that didn't allow generic URL routing handlers to be
registered to take effect /before/ app-level code kicks in. YMMV.

Honestly, I'd really not do this at the infra level myself.

Cheers,
Jonathan
-- 
Jonathan Matthews // Oxford, London, UK
http://www.jpluscplusm.com/contact.html

Reply via email to