Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cookies_helper.rb « helpers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3a7e99871900e2f7fbcbb3de26a195042fe853cb (plain)
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true

module CookiesHelper
  def set_secure_cookie(key, value, httponly: false, permanent: false)
    cookie_jar = permanent ? cookies.permanent : cookies

    cookie_jar[key] = { value: value, secure: Gitlab.config.gitlab.https, httponly: httponly }
  end
end