#### Server configuration
#
# The :base_url specifies the prefix for all default http responders.
:base_url: '/'
#
# This setting defines if requests should be gzip-compressed or not.
# This is a trade-off between cpu cycles used and network bandwidth used.
# It's generally a good idea to leave it as false (gzipping enabled).
:no_gzip: false
#
# Enabling this appends all msg.reply call output to stdout
:trace: false
#
# The settings for the index_html plugin
:index_html:
  #
  # HTML template file path relative to the plugin dir
  :index_tmpl: 'tmpl/index.html'
  #
  # The index.html page <title>
  :title: 'RSence'
  #  
  :noscript: '<h1>Sorry!</h1><p>This site requires a Javascript -capable web browser.</p><p>Please enable Javascript or upgrade your browser.</p>'
  #
  :instance: null
  #
  # A list of javascript dependencies to include in the html
  :deps: [ ]
  #
  # Boot library (default dependency, the package to load into html):
  :boot_lib: rsence
  #
  # Default additional libraries to use:
  :default_libs: []
  #
  # Default HTML <body> contents
  :body: ''
#
# The default language to use
# * Used in user_info[:lang] as the default
:lang: en
#
# The settings for the main plugin
:main_plugin:
  #
  # The background color of the web page when loading is done
  :bg_color:            '#ffffff'
  #
  # how many milliseconds to wait before doing an idle poll
  :server_poll_interval: 2000 # 2 seconds
#
# Mobile browser default settings, by device group and model:
:mobile:
  #
  # iOS devices, defaults to iPads:
  ios:
    scale: 1.0
    scale_min: 1.0
    scale_max: 1.0
    #
    # Horizontal mode:
    landscape:
      # Fullscreen (app) mode
      fullscreen:
        width:  1024
        height: 672
      browser:
        width:  1024
        height: 600
    #
    # Horizontal mode:
    portrait:
      # Fullscreen (app) mode
      fullscreen:
        width:  768
        height: 1024
      browser:
        width:  768
        height: 928
    #
    # Dummy iPad override (same as default)
    ipad:
      # nothing to override
    iphone:
      scale: 0.5
      scale_min: 0.5
      scale_max: 0.5
      landscape:
        fullscreen:
          width: 960
          height: 600
        browser:
          width: 960
          height: 536
      portrait:
        fullscreen:
          width: 640
          height: 920
        browser:
          width: 640
          height: 856
#
# The settings for the daemon
:daemon:
  #
  # How long to wait before binding the broker to the
  # HTTP address and port after starting the Transporter.
  # A value of -1 disables the broker completely.
  # Before waiting, the daemon starts all subsystems except the
  # http handling front-end (Broker).
  # Useful in situations where RSence itself configures the
  # network interfaces or the interfaces become available after
  # RSence is started.
  :http_delayed_start: 0
  #
  # Save plugin and session state every n seconds.
  # Set to 0 or negative to disable.
  :autosave_interval: 180 # once every 3 minutes
  #
  # Daemon helper files, leave empty for defaults.
  #:pid_fn: /var/run/rsence.pid
  #:log_fn: /var/log/rsence.log
#
# Switches on debug-mode:
#  - Generates more output
#  - Each time /hello is post-requested:
#    - Plugins are reloaded from source 
#    - GZFiles are reloaded (if more recent than in memory)
:debug_mode: false
#
# Web server-related settings:
:http_server:
  #
  # Simulate network latency. Good for testing how your
  # app behaves with laggy connections.
  :latency: 0
  #
  # HTTP Port number to listen to.
  :port:  '8001'
  #
  # Bind this ip address ('0.0.0.0' means all)
  :bind_address:  '127.0.0.1'
  #
  # Rack handler to use, defaults to puma
  :rack_require: puma
  #
  # These are default options. Ymmv, but these work fine for puma
  :handler_options:
    :Verbose: false
    :Threads: '4:64' # puma default is '0:16'
#
# When enabled, sets http cache headers
# to cache content as long as possible.
:cache_maximize: true
#
# When :cache_maximize is enabled,
# this is the time (in seconds) the cached
# content will expire in
:cache_expire: 14515200 # 6 months
#
# Paths to scan for available plugins
:plugin_paths: [ ]
#
# List of files that include strings
:string_files: [
  "conf/default_strings.yaml"
]
#
# Transporter settings:
:transporter_conf:
  #
  # The HApplication priority of the client, when actively polling.
  :client_poll_priority: 60
  #
  # Reload the client after any plugins are reloaded:
  :client_autoreload: true
#
#
# Session-related settings
:session_conf:
  #
  # Enable cookie-based sessions
  :session_cookies: true
  #
  # Trusting the cookies means ignoring the client protocol session key exchange.
  # Enabled by default, because in most cases, extreme security measures aren't necessary
  # and the drawback of having an invalid session because a tcp packet got lost isn't
  # tolerable as a default setting.
  :trust_cookies: true
  #
  # The comment string in the session cookie
  :ses_cookie_comment: "RSence Session Key"
  #
  # Disposable keys. When enabled, runs in a more secure way and changes the session key on each xhr.
  :disposable_keys:    true
  #
  # Timeout controls how long a session is valid
  :timeout_secs:       900 # 15 minutes
  #
  # Separate timeout for the first request to prevent session flooding
  :timeout_first:       15 # 15 seconds
  #
  # Key length controls the length of the random-part of the key.
  :key_length:   12
  #
  # Cookie keys are this many times longer than xhr keys
  :cookie_key_multiplier: 2
  #
  #
  # When enabled, deletes all old sessions upon server startup.
  # If the --reset-sessions command-line switch is provided,
  # switches this one to true.
  :reset_sessions: false
  #
  # When this is enabled, multiple sessions are allowed for each client
  # When it's enabled, the old session is left intact and a new one is
  # created by making a clone of the last session.
  # If enabled, also check the maximum number of clones allowed in
  # :session_cookie_max_clones
  # Defaults to false, will be the default in a future version.
  :clone_cookie_sessions: true
  #
  # This option overrides the default session timeout.
  # Don't set this to less than the expected poll interval,
  # otherwise the session might expire before the previous
  # (cloned) session re-connects the next time.
  # A safe value for a 60 second poll interval is 120 (default).
  :cloned_session_expires_in: 120
  #
  # Session store/expiry sleep (in seconds) between sessions (to prevent too high loads on cleanup tasks)
  :db_sleep: 0.001
  #
  # Message strings
  :messages:
    #
    # if the session is invalid for one reason or another, display this:
    :invalid_session:
      :title: 'Invalid Session'
      :descr: 'Your session is invalid. Please reload the page to continue.'
      :uri:    '/'
  #
  # MongoDB-specific settings
  :mongo:
    #
    # MongoDB Connection Pool Timeout:
    :pool_timeout: 10 # seconds
    #
    # MongoDB Connection Pool Size:
    :pool_size: 500 # amount of connections
#
# Database configuration
:database:
  # Session database storage string. Leave empty here to enable the wizard for storage.
  :ses_db: 'sqlite://db/ses.db'

#
# ValueManager settings
:values_conf:
  # Key length controls the length of the random-part of the key.
  :key_length:    8
  #
  # Disposable keys, when enabled, changes the value id on each session restoration
  :disposable_keys:   true
#
# Entered by code, empty container
:broker_urls: { }