Skip to content

Commit

Permalink
fix: remove address scope in openid connect default setting
Browse files Browse the repository at this point in the history
  • Loading branch information
icyleaf committed Sep 13, 2024
1 parent c692fae commit 58596f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/models/setting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Setting < RailsSettings::Base
auth_uri: ENV.fetch('OIDC_AUTH_URI', '/authorize'),
token_uri: ENV.fetch('OIDC_TOKEN_URI', '/token'),
userinfo_uri: ENV.fetch('OIDC_USERINFO_URI', '/userinfo'),
scope: ENV.fetch('OIDC_SCOPE', 'openid,email,profile,address'),
scope: ENV.fetch('OIDC_SCOPE', 'openid,email,profile'),
response_type: ENV.fetch('OIDC_RESPONSE_TYPE', 'code'),
uid_field: ENV.fetch('OIDC_UID_FIELD', 'preferred_username')
}, validates: { json: { format: :hash } }
Expand Down
22 changes: 5 additions & 17 deletions config/initializers/sentry.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# frozen_string_literal: true

# 默认开启 Sentry,如果不想使用设置 ZEALOT_SENTRY_DISABLE=1
if Rails.env.production? && ActiveModel::Type::Boolean.new.cast(ENV['ZEALOT_SENTRY_DISABLE'] || false)
# if Rails.env.production? && ActiveModel::Type::Boolean.new.cast(ENV['ZEALOT_SENTRY_DISABLE'] || false)
Rails.configuration.to_prepare do
Sentry.init do |config|
config.dsn = ENV['ZEALOT_SENTRY_DNS'] || 'https://133aefa9f52448a1a7900ba9d02f93e1@o333914.ingest.us.sentry.io/1878137'

config.environment = Rails.env
config.enabled_environments = %w[production development]
config.include_local_variables = true
config.rails.report_rescued_exceptions = true
config.breadcrumbs_logger = %i[active_support_logger sentry_logger http_logger]

config.enabled_patches << :faraday << :graphql
config.send_default_pii = true
config.environment = Rails.env
config.enabled_environments = %w[production development]

config.excluded_exceptions += [
'ActionController::RoutingError',
'ActiveRecord::RecordNotFound',
Expand All @@ -26,17 +25,6 @@
'SystemExit',
]

config.traces_sampler = lambda do |sampling_context|
transaction_context = sampling_context[:transaction_context]
op = transaction_context[:op]
case op
when /good_job/
0.1
else
0.5
end
end

if vcs_ref = Setting.vcs_ref.presence
release = [Setting.version, vcs_ref]
if docker_tag = ENV['DOCKER_TAG'].presence
Expand All @@ -46,4 +34,4 @@
end
end
end
end
# end

0 comments on commit 58596f5

Please sign in to comment.