mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-21 10:18:21 -05:00
07a718dc8e
With Go 1.20 the "Rewrite" hook for ReverseProxy was introduced to supersede of the "Director" hook (see: https://github.com/golang/go/commit/a55793835f16d0242be18aff4ec0bd13494175bd) The Rewrite hooks allows for better separation between the incoming and outgoing request. In particular it makes it pretty easy to set the correct X-Forwarded-* Headers on the outgoing request. The need for using "Rewrite" came up when trying to embed authelia. It uses the X-Forwarded-Host and X-Forwared-Proto headers to e.g. compute the correct return values for the various endpoints in .well-known/openid-configuration.