Forum

custom request headers

Jens
26 October 2016, 12:58
Hi,

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?
Thanks!
Hugo Leisink
26 October 2016, 15:04
No. What kind of headers do you want to insert?
Jens
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.
Jens
26 October 2016, 17:56
Setup:

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.
Jens
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.
Jens
26 October 2016, 18:13
wow!
Never expected such a cool reply to it...
This topic has been closed.