(host: string)
| 559 | // The shape check rules out paths, userinfo and lists; the URL parser rejects |
| 560 | // invalid IP literals and out-of-range ports, matching what `toURL` accepts. |
| 561 | const isValidHost = (host: string): boolean => hostShape.test(host) && URL.canParse(`http://${host}`) |
| 562 | |
| 563 | /** |
| 564 | * Middleware that parses the current request URL's search parameters and provides them as `ParsedSearchParams`. |