refactor seo_proxy to support user-agent based proxying