RubyFlow The Ruby and Rails community linklog

Securing Resque::Server in Rails 3

A really simple way to secure Resque::Server in a rails 3 app.

Comments

you can do this in config.ru in your rails app

require ‘resque/server’

Resque::Server.use Rack::Auth::Basic do |username, password| username == ‘admin’ && password == ‘password’ end

rails & mount sinatra

run Rack::URLMap.new “/” => YourRailsApp::Application, “/resque” => Resque::Server.new

If you’re already using Devise you can use it to secure your mounted Resque web console: Rails 3, Resque, and Devise

@michelson - thanks for the tip.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in