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

Support one of stud's methods of passing the client IP to the backend #94

Closed
edevil opened this issue Dec 19, 2012 · 7 comments
Closed
Assignees

Comments

@edevil
Copy link
Contributor

edevil commented Dec 19, 2012

It would be great to support one of stud's methods of passing the client IP to the backend:

      --write-ip             Write 1 octet with the IP family followed by the IP
                             address in 4 (IPv4) or 16 (IPv6) octets little-endian
                             to backend before the actual data
                             (Default: off)
      --write-proxy          Write HaProxy's PROXY (IPv4 or IPv6) protocol line
                             before actual data
                             (Default: off)
@ghost ghost assigned unbit Dec 19, 2012
@unbit
Copy link
Owner

unbit commented Dec 19, 2012

backported --http-stud-prefix to 1.4 branch.

The system is simple you add the list of ip addresses (currently only ipv4) from which a stud prefix (--write-ip stud's option) is expected.

--http-stud-prefix 127.0.0.1 --http-stud-prefix 192.168.173.2

will expect a stud prefix on the connections coming from 127.0.0.1 and 192.168.173.2

@edevil
Copy link
Contributor Author

edevil commented Dec 19, 2012

That was fast! Thanks a lot. I will test it first thing tomorrow.

@edevil
Copy link
Contributor Author

edevil commented Dec 19, 2012

It seems to be working. Could you also set "wsgi.url_scheme" accordingly? Otherwise apps will not be able to know whether a request was done with SSL or not.

Thanks again!

@unbit
Copy link
Owner

unbit commented Dec 20, 2012

I think it would be better to directly set the CGI var HTTPS to on, so all of the plugins will benefit from that. As stud is ssl-only i think we are safe (and eventually the user/developer can always change the scheme in its app)

@unbit
Copy link
Owner

unbit commented Dec 21, 2012

ok, backported the HTTPS management even in 1.4 branch. Let me know if all is ok

@edevil
Copy link
Contributor Author

edevil commented Dec 21, 2012

It is working perfectly.

Thanks Roberto!

@edevil
Copy link
Contributor Author

edevil commented Dec 30, 2012

This is done.

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

No branches or pull requests

2 participants