mosquito / pypi-server

Tornado based server like pypi.python.org. With caching from pypi.
MIT License
120 stars 38 forks source link

HTTP proxy support #8

Closed jgiannuzzi closed 8 years ago

jgiannuzzi commented 8 years ago

This PR adds support for using pypi-server behind an HTTP proxy through the standard environment variables http_proxy or https_proxy (depending on the scheme of the PyPI index URL).

jgiannuzzi commented 8 years ago

Thanks for all the merges!

Unrelated, but I have one more potential PR: the advertised default value for the "gzip" option is False, but the actual default value is True. I want to fix it, but what should the default value be? Even though it was advertised as False, it was actually True, so changing it to False would change the current behaviour. What do you think?

mosquito commented 8 years ago

Actually I use nginx as a reverse proxy I don't want compress/decompress response twice. When you want to run this service without nginx you can enable gzip explicitly.

mosquito commented 8 years ago

Thanks for all the merges!

My pleasure.

jgiannuzzi commented 8 years ago

So what should the actual default be? gzip=False?

mosquito commented 8 years ago

So what should the actual default be? gzip=False?

Yes gzip=False is correct. Explicit better than implicit.