diff options
Diffstat (limited to 'ext/http/00_serve.js')
-rw-r--r-- | ext/http/00_serve.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/http/00_serve.js b/ext/http/00_serve.js index 95079f412..e881cca2a 100644 --- a/ext/http/00_serve.js +++ b/ext/http/00_serve.js @@ -627,6 +627,17 @@ function serve(arg1, arg2) { reusePort: options.reusePort ?? false, }; + if (options.certFile || options.keyFile) { + throw new TypeError( + "Unsupported 'certFile' / 'keyFile' options provided: use 'cert' / 'key' instead.", + ); + } + if (options.alpnProtocols) { + throw new TypeError( + "Unsupported 'alpnProtocols' option provided. 'h2' and 'http/1.1' are automatically supported.", + ); + } + let listener; if (wantsHttps) { if (!options.cert || !options.key) { |