Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
"selfsigned": "^2.4.1",
"serve-index": "^1.9.2",
"sockjs": "^0.3.24",
"spdy": "^4.0.2",
"webpack-dev-middleware": "^7.4.5",
"ws": "^8.19.0"
},
Expand Down
135 changes: 0 additions & 135 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 1 addition & 12 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -893,18 +893,7 @@ class Server<

const serverOptions = options.server.options as ServerOptions;

if (
options.server.type === 'spdy' &&
typeof serverOptions.spdy === 'undefined'
) {
serverOptions.spdy = { protocols: ['h2', 'http/1.1'] };
}

if (
options.server.type === 'https' ||
options.server.type === 'http2' ||
options.server.type === 'spdy'
) {
if (options.server.type === 'https' || options.server.type === 'http2') {
if (typeof serverOptions.requestCert === 'undefined') {
serverOptions.requestCert = false;
}
Expand Down
11 changes: 1 addition & 10 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,7 @@ export type HandleFunction =
| NextHandleFunction
| ErrorHandleFunction;

export type ServerOptions = import('https').ServerOptions & {
spdy?: {
plain?: boolean;
ssl?: boolean;
'x-forwarded-for'?: string;
protocol?: string;
protocols?: string[];
};
};
export type ServerOptions = import('https').ServerOptions;

// type-level helpers, inferred as util types
export type Request<T extends BasicApplication = ExpressApplication> =
Expand Down Expand Up @@ -129,7 +121,6 @@ export type ServerType<
> =
| 'http'
| 'https'
| 'spdy'
| 'http2'
| string
| ((serverOptions: ServerOptions, application: A) => S);
Expand Down
Loading