mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-09 22:14:13 +09:00
feature #3819: Add ssl proxy url to the onegate con
(cherry picked from commit 88d4825be2d48feebb210a4323e523490f0cee67)
This commit is contained in:
1 parent
838f64d5ad
commit
034f6ab8ee
2 files changed
+10
-4
No files matched your search
@@ -27,6 +27,9 @@
|
||||
:host: 127.0.0.1
|
||||
:port: 5030
|
||||
|
||||
# SSL proxy URL that serves the API (set if is being used)
|
||||
#:ssl_server: https://service.endpoint.fqdn:port/
|
||||
|
||||
################################################################################
|
||||
# Log
|
||||
################################################################################
|
||||
|
||||
@@ -242,10 +242,13 @@ get '/' do
|
||||
client = authenticate(request.env, params)
|
||||
halt 401, "Not authorized" if client.nil?
|
||||
|
||||
protocol = request.env["rack.url_scheme"]
|
||||
host = request.env["HTTP_HOST"]
|
||||
|
||||
base_uri = "#{protocol}://#{host}"
|
||||
if $conf[:ssl_server]
|
||||
base_uri = $conf[:ssl_server]
|
||||
else
|
||||
protocol = request.env["rack.url_scheme"]
|
||||
host = request.env["HTTP_HOST"]
|
||||
base_uri = "#{protocol}://#{host}"
|
||||
end
|
||||
|
||||
response = {
|
||||
"vm_info" => "#{base_uri}/vm",
|
||||
|
||||
Reference in new issue
Block a user