Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi, Can you add new options in [inet_http_server] #372

Closed
ivanff opened this issue Feb 11, 2014 · 3 comments
Closed

Hi, Can you add new options in [inet_http_server] #372

ivanff opened this issue Feb 11, 2014 · 3 comments
Labels

Comments

@ivanff
Copy link

ivanff commented Feb 11, 2014

For use http proxy, I use nginx:

rewrite ^/supervisor$ /supervisor/ redirect;

location /supervisor/ {
auth_basic "Restricted Resource";
auth_basic_user_file /home/ivan/htpasswd;
....
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://127.0.0.1:9001/;
}

But some form posts redirect 301 to /, I fix it write in web.py

def get_server_url(self):
...
server_url += '/supervisor/'
return server_url

new options like

[inet_http_server]
port = 127.0.0.1:9001
path_info='/supervisor/'

or with change parse option :)
[inet_http_server]
port = 127.0.0.1:9001/supervisor/

What do you think about it, this is usefull?

@NotSqrt
Copy link

NotSqrt commented Apr 2, 2014

👍

@NotSqrt
Copy link

NotSqrt commented Apr 2, 2014

Would it be as simple as honoring cgi's SCRIPT_NAME ? (it is forced to '' in http.py)
but in the case of proxy_pass, I think it is not a direct cgi call, and there is no easy way to trust some sort of HTTP header set by the proxy.

@mnaberez
Copy link
Member

Closing as a duplicate of #29, which is still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants