Sha256: de880fef2bda22ab9f853391d19cc12d01a92c84a4164c513b1adce5e6dcb4c4

Contents?: true

Size: 304 Bytes

Versions: 1

Compression:

Stored size: 304 Bytes

Contents

module Micropub::Server::Rails
  class Middleware
    def initialize(app)
      @app = app
    end

    def call(env)
      if env["PATH_INFO"] == "/micropub"
        [200, { "Content-Type" => "text/plain; charset=utf-8" }, ["I am micropub"]]
      else
        @app.call env
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
micropub-server-rails-0.1.1 lib/micropub/server/rails/middleware.rb