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:
parent
2f1a6b4a70
commit
1811827c5d
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user