code: def check_origin(self, origin):
          
  
          mod_opts = self.application.mod_opts
  
          if mod_opts.get('cors_origin'):
              return bool(_check_cors_origin(origin, mod_opts['cors_origin']))
          else:
              return super(AllEventsHandler, self).check_origin(origin)
docs: If cors is enabled, check that the origin is allowed