mirror of
https://github.com/danbee/danbarberphoto
synced 2025-03-04 08:49:07 +00:00
Add warning if not on an SSL connection.
This commit is contained in:
parent
2b4a72f28e
commit
34baa4bb48
@ -1,3 +1,12 @@
|
|||||||
class Admin::SessionsController < ::Devise::SessionsController
|
class Admin::SessionsController < ::Devise::SessionsController
|
||||||
layout "admin/layouts/login"
|
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
|
||||||
@ -5,3 +5,5 @@ en:
|
|||||||
contact:
|
contact:
|
||||||
thanks: Thanks for your email, I'll be in touch as soon as possible.
|
thanks: Thanks for your email, I'll be in touch as soon as possible.
|
||||||
invalid: Please fill in fields marked in red.
|
invalid: Please fill in fields marked in red.
|
||||||
|
|
||||||
|
insecure_alert: You are on an insecure connection. Sign in will not work. <a href="%{secure_link}">Switch</a>.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user