title: Devise CustomFailure and mount in routes, bad redirect
body: <p>I'm using a <code>CustomFailure</code> class like shown in the doc (<a href="https://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-when-the-user-can-not-be-authenticated" rel="nofollow">here</a>) to redirect to our sign in page when someone is unauthenticated:</p>
  
  <pre><code>class CustomFailure &lt; Devise::FailureApp
    include Localization
  
    def redirect_url
      url_for(controller: "/public/sessions", action: :new, locale: locale_to_params(I18n.locale))
    end
  
    # You need to override respond to eliminate recall
    def respond
      if http_auth?
        http_auth
      else
        redirect
      end
    end
  end
  </code></pre>
  
  <p>So this normally redirects to <code>http://www.acmecorp.com/en/signin</code>, but with the Sidekiq panel in <code>routes.rb</code>:</p>
  
  <pre><code>  authenticate :user, lambda { |u| u.super_admin? } do
      require "sidekiq/web"
      mount Sidekiq::Web =&gt; "/sidekiq"
    end
  </code></pre>
  
  <p>I get redirected to <code>http://www.acmecorp.com/sidekiq/en/signin</code> instead of <code>http://www.acmecorp.com/en/signin</code>. Any reason why the redirect does not get rid of the <code>/sidekiq</code> part?</p>
  
  <p>Thanks!</p>