Skip to content

Instantly share code, notes, and snippets.

@cwise
Created January 7, 2012 15:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cwise/1575082 to your computer and use it in GitHub Desktop.
Save cwise/1575082 to your computer and use it in GitHub Desktop.
EngineYard resque-web
require 'resque/server'
resque_constraint = lambda do |request|
request.env['warden'].authenticate? and request.env['warden'].user.admin? # or whatever manner your admin role can be determined
end
constraints resque_constraint do
mount Resque::Server.new, :at => "/resque"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment