File
Blob: src/node/internal/internal_https_server.ts
| 1 | // Copyright (c) 2026 Cloudflare, Inc. |
| 2 | // Licensed under the Apache 2.0 license found in the LICENSE file or at: |
| 3 | // https://opensource.org/licenses/Apache-2.0 |
| 4 | |
| 5 | import { Server as HttpServer } from 'node-internal:internal_http_server'; |
| 6 | import { ERR_METHOD_NOT_IMPLEMENTED } from 'node-internal:internal_errors'; |
| 7 | import type { Server as _Server } from 'node:https'; |
| 8 | |
| 9 | export class Server extends HttpServer implements _Server { |
| 10 | addContext(): void { |
| 11 | // Workerd don't support TLS SecureContext. It doesn't |
| 12 | // make sense to support this for us. |
| 13 | throw new ERR_METHOD_NOT_IMPLEMENTED('addContext'); |
| 14 | } |
| 15 | |
| 16 | getTicketKeys(): Buffer<ArrayBuffer> { |
| 17 | // We don't support TLS ticket keys. |
| 18 | throw new ERR_METHOD_NOT_IMPLEMENTED('getTicketKeys'); |
| 19 | } |
| 20 | |
| 21 | setSecureContext(): void { |
| 22 | // We don't support this for now. |
| 23 | // TODO(soon): Investigate if we want to have a implementation |
| 24 | // that just makes input validations and ignores the context. |
| 25 | throw new ERR_METHOD_NOT_IMPLEMENTED('setSecureContext'); |
| 26 | } |
| 27 | |
| 28 | setTicketKeys(): void { |
| 29 | // We don't support TLS ticket keys. |
| 30 | throw new ERR_METHOD_NOT_IMPLEMENTED('setTicketKeys'); |
| 31 | } |
| 32 | } |