From 8794e3c22e5d9246394889f2a1a6abe346ec1fd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Erik=20=C3=95unapuu?= Date: Thu, 1 Oct 2020 12:30:51 +0300 Subject: [PATCH 1/2] Production env: don't force SSL in rails --- config/environments/production.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 377166f29..e1966d6ba 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -43,7 +43,7 @@ Rails.application.configure do # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - config.force_ssl = true + config.force_ssl = false # Use the lowest log level to ensure availability of diagnostic information # when problems arise. From d979fb4f458ae45fe6d32273181a1b8ce75342b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Erik=20=C3=95unapuu?= Date: Thu, 1 Oct 2020 13:25:05 +0300 Subject: [PATCH 2/2] Respect User type when using from_omniauth() --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index e1b98f3a6..18ab410d0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -16,6 +16,6 @@ class User < ApplicationRecord identity_code = uid.slice(2..-1) # country_code = uid.slice(0..1) - User.find_by(identity_code: identity_code) + find_by(identity_code: identity_code) end end