Sha256: e5cf8c46a84a6221775fd58691ed87785c7c2bf2525491667031b7979df82e88

Contents?: true

Size: 839 Bytes

Versions: 70

Compression:

Stored size: 839 Bytes

Contents

# frozen_string_literal: true

module PlatformSdk
  module Sentry
    def self.sentry_ignored(event, ignored_urls = sentry_ignored_urls)
      return false if event.transaction_info[:source] != :url
      return true if ignored_urls.any? { |url| event.transaction.match?(url) }

      false
    end

    def self.sentry_ignored_urls
      [
        %r{/up$}i,
        %r{/health_check$}i,
        %r{/favicon\.ico$}i,
        %r{/robots\.txt$}i,
        %r{/nuclei.svg$}i,
        %r{/wp-admin}i,
        %r{/cgi-bin}i,
        %r{/jmx-console}i,
        %r{/manager/html}i,
        %r{/phpmyadmin}i,
        /.+\.php$/i,
        /.+\.ini$/i,
        /.+\.env$/i,
        /.+\.txt$/i,
        /.+\.jsp$/i,
        /.+\.do$/i,
        /.+\.srf$/i,
        /.+\.bak$/i,
        /.+\.cfml?$/i,
        /.+\.cgi$/i,
      ]
    end

  end
end

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
strongmind-platform-sdk-3.25.0 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.24.0 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.23.7 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.23.6 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.23.5 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.23.4 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.23.3 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.23.2 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.23.1 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.23.0 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.22.1 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.22.0 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.21.8 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.21.7 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.21.6 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.21.5 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.21.4 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.21.3 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.21.2 lib/platform_sdk/sentry.rb
strongmind-platform-sdk-3.21.1 lib/platform_sdk/sentry.rb