def url_match?(request_url)
      case base_url
      when String
        base_url == request_url
      when Regexp
        base_url === request_url
      when nil
        true
      else
        false
      end
    end
def url_match?(request_url)
      case base_url
      when String
        base_url == request_url
      when Regexp
        base_url === request_url
      when nil
        true
      else
        false
      end
    end
Check whether the base_url matches the request url.
 The base_url can be a string, regex or nil. String and
 regexp are checked, nil is always true, else false.

 Nil serves as a placeholder in case you want to match
 all urls.