if (req.method == "OPTIONS" && req.http.Origin &&
  (req.http.Access-Control-Request-Method || 
  req.http.Access-Control-Request-Headers)
) {
  error 601;
}