Skip to content

Commit

Permalink
Check that environment_name starts with review rather than == review
Browse files Browse the repository at this point in the history
  • Loading branch information
AbigailMcP committed May 22, 2024
1 parent 087f7b7 commit 4428d49
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/initializers/dfe_analytics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Whether to log events instead of sending them to BigQuery.
#
# config.log_only = true
config.log_only = (%w[development test].include?(ENV["RAILS_ENV"]) || ENV["ENVIRONMENT_NAME"] == "review")
config.log_only = (%w[development test].include?(ENV["RAILS_ENV"]) || ENV["ENVIRONMENT_NAME"].start_with?("review"))

# Whether to use ActiveJob or dispatch events immediately.
#
Expand Down
4 changes: 2 additions & 2 deletions config/initializers/omniauth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
tid_sign_in_redirect_uri = URI.parse(ENV["TID_BASE_URL"])
tid_sign_in_redirect_uri.path = "/claim/auth/tid/callback"

if ENV["ENVIRONMENT_NAME"] == "review"
if ENV["ENVIRONMENT_NAME"].start_with?("review")
tid_sign_in_redirect_uri.host = ENV["CANONICAL_HOSTNAME"]
end
end

module ::DfESignIn
def self.bypass?
(Rails.env.development? || ENV["ENVIRONMENT_NAME"] == "review") && ENV["BYPASS_DFE_SIGN_IN"] == "true"
(Rails.env.development? || ENV["ENVIRONMENT_NAME"].start_with?("review")) && ENV["BYPASS_DFE_SIGN_IN"] == "true"
end
end

Expand Down
2 changes: 1 addition & 1 deletion config/initializers/session_store.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
domain = if ENV["ENVIRONMENT_NAME"] == "review"
domain = if ENV["ENVIRONMENT_NAME"].start_with?("review")
ENV["CANONICAL_HOSTNAME"]
elsif !ENV["TID_BASE_URL"].nil?
URI.parse(ENV["TID_BASE_URL"]).host
Expand Down

0 comments on commit 4428d49

Please sign in to comment.