custom request headers

26 October 2016, 12:58

hiawatha is acting for ssl offloading and reverse proxying in my setup.
Is there a way to insert custom request headers to be used by the backend server?
Hugo Leisink
26 October 2016, 15:04
No. What kind of headers do you want to insert?
26 October 2016, 17:44
I am trying to workaround an issue of the backend application...I think I know what you will write next.

Without having deep inspected what headers are sent to the backend, I thought something like protocol or port information (x-forwarded-proto, x-forwarded-port) could be missing, because redirects in responses are build incorrect.
26 October 2016, 17:56

FW:custom_port => hiawatha:443, TLS required, reverse proxy => backend (seahub:8000)

Meanwhile I put a nginx between hiawatha and seahub´s gunicorn.
Setting the mentioned headers in nginx showed no change on seahub´s beahviour.
Workaround is to set

proxy_set_header  Host $host:$FW_custom_port;
proxy_redirect http://$host https://$host:$FW_custom_port;

in nginx.
26 October 2016, 17:58
Would be cool to have that header manipulating stuff in hiawatha...beside fixing the application, of course.
Hugo Leisink
26 October 2016, 18:03
I'll see what I can do to add this functionality to the next release.
26 October 2016, 18:13
Never expected such a cool reply to it...
This topic has been closed.