httpd behind proxy

Dilyan Palauzov Dilyan.Palauzov at aegee.org
Wed Jun 20 12:23:56 EDT 2018


Hello,

I want to run cyrus-httpd behind proxy, making it to listen to  
127.0.0.3:80.  It then sends on /freebusy/user/me URL:  
http://127.0.0.3/freebusy/user/me , which I don't want.  If I tweak  
the front-end, nginx, to rewrite 127.0.0.3 -> my hostname, Nginx is  
smart enogh and removes the ETags sent by cyrus/httpd, so this  
approach does not work.

Then I decided to insert "Forwarded: host=my host; proto=https"  
header, however imap/http_proxy.c:http_proto_host handles the  
Forwarded header only

     if (config_mupdate_server && config_getstring(IMAPOPT_PROXYSERVERS) &&
         (fwd = spool_getheader(req_hdrs, "Forwarded"))) {
         /* Proxied request - parse last Forwarded header for proto and host */

What is the rationale behind interpreting Forwarded only when  
mupdate_server and proxyservers are set?

Greetings
   Dilian



More information about the Cyrus-devel mailing list