Merge branch 'railsguru-feature-proxy' into sinatra
This commit is contained in:
Коммит
39023fd8ec
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче