Skip to content
This repository has been archived by the owner on Mar 26, 2022. It is now read-only.

Rack middleware which adds an X-Request-Id header

License

Notifications You must be signed in to change notification settings

crashlytics/rack-request-id

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rack::RequestId

Rack middleware which adds a 16-digit hexidecimal X-Request-Id header to the response and into Thread.current[:request_id]

Usage

gem 'rack-request-id'

Sinatra

class MyApp < Sinatra::Base
  use Rack::RequestId
end

Rails

module MyApp
  class Application < Rails::Application
    # ...
    config.middleware.use "Rack::RequestId"
  end
end

Configuration

TODO: proc option to override id format

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Rack middleware which adds an X-Request-Id header

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%