1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-25 02:50:08 +03:00

F #4959: Added parameter to sunstone-server.conf to allow setting of web session length.

This commit is contained in:
Jeff Bearer 2016-12-27 18:34:50 -05:00 committed by Ruben S. Montero
parent 2f1a6b4a70
commit 1811827c5d
2 changed files with 6 additions and 3 deletions

View File

@ -121,6 +121,8 @@
:vnc_proxy_ipv6: false
:vnc_request_password: false
# Login Session Length in seconds, defaults to 1 hour.
#:session_expire_time: 3600
# Default language setting
:lang: en_US

View File

@ -47,8 +47,6 @@ $: << RUBY_LIB_LOCATION+'/cloud'
$: << SUNSTONE_ROOT_DIR
$: << SUNSTONE_ROOT_DIR+'/models'
SESSION_EXPIRE_TIME = 60*60
DISPLAY_NAME_XPATH = 'TEMPLATE/SUNSTONE/DISPLAY_NAME'
TABLE_ORDER_XPATH = 'TEMPLATE/SUNSTONE/TABLE_ORDER'
DEFAULT_VIEW_XPATH = 'TEMPLATE/SUNSTONE/DEFAULT_VIEW'
@ -113,6 +111,9 @@ end
$conf[:debug_level] ||= 3
# Set Sunstone Session Timeout
$conf[:session_expire_time] ||= 3600
# Set the TMPDIR environment variable for uploaded images
ENV['TMPDIR']=$conf[:tmpdir] if $conf[:tmpdir]
@ -427,7 +428,7 @@ after do
if params[:timeout] == "true"
env['rack.session.options'][:defer] = true
else
env['rack.session.options'][:expire_after] = SESSION_EXPIRE_TIME
env['rack.session.options'][:expire_after] = $conf[:session_expire_time]
end
end
end