redirect to https in prod

This commit is contained in:
bruckwubete 2018-07-23 15:30:31 -04:00
parent 01ea22ed6d
commit 5f6d70f751
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ module SessionsHelper
end
def omniauth_options(env)
gl_redirect_url = env["rack.url_scheme"] + "://" + env["SERVER_NAME"] + ":" + env["SERVER_PORT"]
gl_redirect_url = (Rails.env.production? ? "https" : env["rack.url_scheme"]) + "://" + env["SERVER_NAME"] + ":" + env["SERVER_PORT"]
env['omniauth.strategy'].options[:customer] = parse_customer_name env["SERVER_NAME"]
env['omniauth.strategy'].options[:gl_redirect_url] = gl_redirect_url
env['omniauth.strategy'].options[:default_callback_url] = Rails.configuration.gl_callback_url