gitlab-org--gitlab-foss/config/initializers/session_store.rb
amouhzi 39d8a64d25 Fixes grack authentification under relative_url_root
Ref: e6159b8725
Ref: https://github.com/gitlabhq/gitlabhq/pull/3204
Ref: https://github.com/gitlabhq/gitlabhq/issues/1228

Add Rails' variable in application.rb to support relative url

This variable is used by assets compilation and other modules.

Note that user needs to change application.rb too

Restrict session cookie to the relative path if set.

Ref: 2c2f1e3185

Fix Update attachment_uploader.rb bug with relative URL

See: 161afda3fa

Fix Wall relative bug with attachement files (javascript)
2013-08-15 21:25:09 +02:00

11 lines
742 B
Ruby

# Be sure to restart your server when you modify this file.
Gitlab::Application.config.session_store :cookie_store, key: '_gitlab_session',
secure: Gitlab::Application.config.force_ssl,
httponly: true,
path: (Rails.application.config.relative_url_root.nil?) ? '/' : Rails.application.config.relative_url_root
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rails generate session_migration")
# Gitlab::Application.config.session_store :active_record_store