Merge branch 'railsguru-feature-proxy' into sinatra

This commit is contained in:
Matt Zukowski 2010-10-06 15:01:44 -04:00
Родитель 1a06b39cf1 734d963301
Коммит 39023fd8ec
2 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@ -22,7 +22,11 @@ class CASServer::Authenticators::Google < CASServer::Authenticators::Base
}
url = URI.parse('https://www.google.com/accounts/ClientLogin')
http = Net::HTTP.new(url.host, url.port)
if $CONF.proxy_host
http = Net::HTTP.Proxy($CONF.proxy_host, $CONF.proxy_port, $CONF.proxy_username, $CONF.proxy_password).new(url.host, url.port)
else
http = Net::HTTP.new(url.host, url.port)
end
http.use_ssl = true
# TODO: make the timeout configurable

Просмотреть файл

@ -43,6 +43,17 @@ ssl_cert: /path/to/your/ssl.pem
# ssl_cert: ssl/cert.pem
# ssl_key: ssl/key.pem
###
### Proxy support (Google, etc)
###
# If your server is behind a proxy you can uncomment the following lines in order
# to activate proxy support:
#
# proxy_host: your-proxy-server
# proxy_port: 8080
# proxy_username: nil
# proxy_passsword: nil
# By default the login page will be available at the root path
# (e.g. https://login.example.net/). The uri_path option lets you serve it from a