Sha256: 5e2d5ec647eabec22cd5d83384555b14ad1c38417904b4bd8757e2bb81c0d8c3

Contents?: true

Size: 300 Bytes

Versions: 1

Compression:

Stored size: 300 Bytes

Contents

module Silencer
  module Hush

    private

    def silence_request?(env)
      (silent_header?(env) || silent_path?(env))
    end

    def silent_header?(env)
      env['HTTP_X_SILENCE_LOGGER']
    end

    def silent_path?(env)
      @silence.any? { |s| s === env['PATH_INFO'] }
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
silencer-1.0.0.rc1 lib/silencer/hush.rb