cherrypy.HTTPRedirect redirects to IP instead of hostname using abs path

廉价感情. 提交于 2019-11-30 17:07:24
jwalker

Try tools.proxy config setting:

'tools.proxy.on': True,

Additionally you may need

'tools.proxy.local': 'X-Forwarded-Host',

Set to appropriate header. When using NGINX, the header would be

'tools.proxy.local': 'Host',

In case of Lighttpd this header will be appropriate:

'tools.proxy.local': 'X-Host'
maxkoryukov

I couldn't add a comment to the https://stackoverflow.com/a/20730038/1115187 , but I know, that Lighttpd sends X-Host header, so for Lighttpd proxy use:

'tools.proxy.local': 'X-Host'
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!