code: def get_path_prefix
        if defined?(Rails) && Rails.application.config.relative_url_root
          Regexp.new("^" + Regexp.escape(Rails.application.config.relative_url_root))
        end
      end
docs: Configures the @path_prefix in order to handle apps
   mounted under RAILS_RELATIVE_URL_ROOT.