Match any Connection header that contains the Upgrade token for websocke...

...ts
You mean just the string portion of it? something like:

const connectionUpgradeRegex = "(^|.*,\\s*)upgrade($|\\s*,)"