Move yabeda/prometheus stuff to the gem

This commit is contained in:
Jorge Manrubia
2025-11-28 11:50:51 +01:00
parent 3b0ddf4cfb
commit 6ccf655597
10 changed files with 38 additions and 163 deletions
@@ -42,8 +42,8 @@ module RequestForgeryProtection
Rails.logger.info "CSRF protection check: " + info.map { it.join(" ") }.join(", ")
if (origin && token) != sec_fetch_site
Sentry.try :capture_message, "CSRF protection mismatch", level: :info, extra: { info: info }
if defined?(Sentry) && (origin && token) != sec_fetch_site
Sentry.capture_message "CSRF protection mismatch", level: :info, extra: { info: info }
end
end
end