Possible? proxy scheme - match request

How do I configure the proxy to connect to the backend using the same protocol as the incoming http request? I.e. if the internet user connects with http, connect to the backend using https. And likewise for http

If you separate the incoming requests like so it should work:

http://example.com {
  proxy / http://upstream.example.com {
    transparent
  }
}
https://example.com {
  proxy / https://upstream.example.com {
    transparent
  }
}

I believe this also has the effect of removing the automatic redirection from http to https.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.