mirror of
https://github.com/danbee/danbarberphoto
synced 2025-03-04 08:49:07 +00:00
15 lines
351 B
Ruby
15 lines
351 B
Ruby
module Admin
|
|
class SessionsController < ::Devise::SessionsController
|
|
layout 'admin/layouts/login'
|
|
|
|
before_filter :check_https
|
|
|
|
private
|
|
|
|
def check_https
|
|
secure_link = url_for(protocol: 'https')
|
|
flash[:alert] = I18n.t('insecure_alert', secure_link: secure_link).html_safe unless request.scheme == 'https'
|
|
end
|
|
end
|
|
end
|