Reverse Proxy to external HTTPS backend with custom Host header and HTTP/1.1

Hi everyone,

we are planning to host a Next.js website on Vercel and would like to integrate an external e-commerce backend under a subpath of the same domain:

www.domain.com/external/https://backend.example.com/external/

We have successfully done this with Apache and nginx before, but we would like to understand if Vercel’s Reverse Proxy feature supports our specific requirements:

  1. Proxy multiple subpaths to an external HTTPS backend
  2. Manually set the Host header to www.domain.com for the backend request - the backend needs to match the incoming domain to serve the correct content
  3. Forward X-Forwarded-Host, X-Forwarded-Proto, and X-Real-IP headers to the backend
  4. Backend connection must use HTTP/1.1 - our backend rejects HTTP/2 requests with a mismatched SNI/Host header with a 421 Misdirected Request
  • Is it possible to manually set the Host header in Vercel’s Reverse Proxy / Rewrites?
  • Does Vercel’s Edge Network use HTTP/1.1 or HTTP/2 for connections to external backends?
  • Is there a way to control the HTTP version used for backend connections?
  • Has anyone successfully set up a similar proxy configuration on Vercel?

Thanks in advance!