Skip to content

Instantly share code, notes, and snippets.

@badosu
Created October 5, 2015 17:44
Show Gist options
  • Save badosu/cc08f2dad40d465bb51d to your computer and use it in GitHub Desktop.
Save badosu/cc08f2dad40d465bb51d to your computer and use it in GitHub Desktop.
r.on 'sidekiq' do
env[Rack::SCRIPT_NAME] = '/admin/sidekiq'
env[Rack::PATH_INFO] = r.remaining_path
status, headers, body = Sidekiq::Web.call(env)
response.status = status
response.headers.merge!(headers)
response.write body.join
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment