debian-mirror-gitlab/app/helpers/cookies_helper.rb
2018-11-20 20:47:30 +05:30

9 lines
286 B
Ruby

# 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