code: def add_access_control_headers(self, env=None):
          
          allowed_methods = 'GET, POST, PUT, OPTIONS, DELETE, PATCH, HEAD, TRACE, CONNECT'
          allowed_origin = None
          if env is not None:
              acr_method = env.get('HTTP_ACCESS_CONTROL_REQUEST_METHOD')
              if acr_method is not None and acr_method not in allowed_methods:
                  allowed_methods = allowed_methods + ', ' + acr_method
              r_method = env.get('REQUEST_METHOD')
              if r_method is not None and r_method not in allowed_methods:
                  allowed_methods = allowed_methods + ', ' + r_method
              acr_headers = env.get('HTTP_ACCESS_CONTROL_REQUEST_HEADERS')
              if acr_headers is not None:
                  self.status_headers.add_header('Access-Control-Allow-Headers', acr_headers)
              allowed_origin = env.get('HTTP_ORIGIN', env.get('HTTP_REFERER', allowed_origin))
          if allowed_origin is None:
              allowed_origin = '*'
          self.status_headers.replace_header('Access-Control-Allow-Origin',  allowed_origin)
          self.status_headers.add_header('Access-Control-Allow-Methods', allowed_methods)
          self.status_headers.add_header('Access-Control-Allow-Credentials', 'true')
          self.status_headers.add_header('Access-Control-Max-Age', '1800')
          return self
docs: Adds Access-Control* HTTP headers to this WbResponse's HTTP headers.
  
          :param dict env: The WSGI environment dictionary
          :return: The same WbResponse but with the values for the Access-Control* HTTP header added
          :rtype: WbResponse