Sha256: b50c67c0e9708431d6e65a14c50c85115d8e3b881ec06c78a4f2dd9bdccf8104
Contents?: true
Size: 442 Bytes
Versions: 2
Compression:
Stored size: 442 Bytes
Contents
require "fluent_logger_statistics/app" module FluentLoggerStatistics class Middleware def initialize(app, path, loggers) @app = app @path = path @fluent_app = App.new(loggers) end ACCEPT_METHODS = ['GET'].freeze def call(env) if env['PATH_INFO'] == @path && ACCEPT_METHODS.include?(env['REQUEST_METHOD']) @fluent_app.call(env) else @app.call(env) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fluent_logger_statistics-0.4.0 | lib/fluent_logger_statistics/middleware.rb |
fluent_logger_statistics-0.3.0 | lib/fluent_logger_statistics/middleware.rb |