function acceptable(
  req,
) {
  const upgrade = req.headers.get("upgrade");
  if (!upgrade || upgrade.toLowerCase() !== "websocket") {
    return false;
  }
  const secKey = req.headers.get("sec-websocket-key");
  return req.headers.has("sec-websocket-key") && typeof secKey === "string" &&
    secKey.length > 0;
}
/** Return whether given headers is acceptable for websocket  */
Return whether given headers is acceptable for websocket
Return whether given headers is acceptable for websocket
function acceptable(
  req,
) {
  const upgrade = req.headers.get("upgrade");
  if (!upgrade || upgrade.toLowerCase() !== "websocket") {
    return false;
  }
  const secKey = req.headers.get("sec-websocket-key");
  return req.headers.has("sec-websocket-key") && typeof secKey === "string" &&
    secKey.length > 0;
}
function acceptable ( req , ) { const upgrade = req . headers . get ( "upgrade" ) ; if ( ! upgrade || upgrade . toLowerCase ( ) !== "websocket" ) { return false ; } const secKey = req . headers . get ( "sec-websocket-key" ) ; return req . headers . has ( "sec-websocket-key" ) && typeof secKey === "string" && secKey . length > 0 ; }
Return whether given headers is acceptable for websocket
Return whether given headers is acceptable for websocket