georchestra / georchestra-gateway

GNU General Public License v3.0
0 stars 5 forks source link

Preserve host header and pass x-forwarded headers #104

Closed edevosc2c closed 6 months ago

edevosc2c commented 6 months ago

This fixes both bug reported in https://github.com/georchestra/georchestra-gateway/issues/102

Also, this helps with the issue https://github.com/georchestra/georchestra-gateway/issues/94 like explained in https://github.com/georchestra/georchestra-gateway/issues/94#issuecomment-1948028574

I made the decision to avoid the gateway modifying the x-forwarded-* headers so that the final application receive the headers in the correct format sent by the original reverse proxy.

You can find documentation about the changes here:

f-necas commented 6 months ago

Tested and it works well. Didn't notice impact when it's set on all routes by now.

pmauduit commented 6 months ago

This broke the testsuite, we should have been more wary about it ; reverting the application.yml file by removing the PreserveHostHeader filter fixes it.