code: def serve_cdx(self, environ, coll='$root'):
          
          base_url = self.rewriterapp.paths['cdx-server']
  
          #if coll == self.all_coll:
          #    coll = '*'
  
          cdx_url = base_url.format(coll=coll)
  
          if environ.get('QUERY_STRING'):
              cdx_url += '&' if '?' in cdx_url else '?'
              cdx_url += environ.get('QUERY_STRING')
  
          try:
              res = requests.get(cdx_url, stream=True)
  
              content_type = res.headers.get('Content-Type')
  
              return WbResponse.bin_stream(StreamIter(res.raw),
                                           content_type=content_type)
  
          except Exception as e:
              return WbResponse.text_response('Error: ' + str(e), status='400 Bad Request')
docs: Make the upstream CDX query for a collection and response with the results of the query
  
          :param dict environ: The WSGI environment dictionary for the request
          :param str coll: The name of the collection this CDX query is for
          :return: The WbResponse containing the results of the CDX query
          :rtype: WbResponse