Module: CookiesHelper
- Included in:
- KnownSignIn, Projects::ApplicationController, RecordUserLastActivity, SortingPreference
- Defined in:
- app/helpers/cookies_helper.rb
Constant Summary collapse
- COOKIE_TYPE_PERMANENT =
:permanent
- COOKIE_TYPE_ENCRYPTED =
:encrypted
Instance Method Summary collapse
Instance Method Details
#set_secure_cookie(key, value, httponly: false, expires: nil, type: nil) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/helpers/cookies_helper.rb', line 7 def (key, value, httponly: false, expires: nil, type: nil) = case type when COOKIE_TYPE_PERMANENT .permanent when COOKIE_TYPE_ENCRYPTED .encrypted else end [key] = { value: value, secure: Gitlab.config.gitlab.https, httponly: httponly, expires: expires } end |