Skip to content

Commit 49a22cc

Browse files
committed
Improve setProtocol request transform types
This is useful because it means downstream we don't end up with ws|wss|http|https which isn't compatible with either step's options.
1 parent e8a2f81 commit 49a22cc

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/rules/passthrough-handling-definitions.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ export interface PassThroughStepConnectionOptions {
127127
*/
128128
export interface PassThroughInitialTransforms {
129129

130-
// Made more specific in subclass overrides
131-
setProtocol?: 'http' | 'https' | 'ws' | 'wss';
132-
133130
/**
134131
* Replace the request host with a single fixed value, effectively forwarding
135132
* all requests to a different hostname.

src/rules/passthrough-handling.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ function deriveUrlLinkedHeader(
236236
}
237237

238238
export function applyDestinationTransforms(
239-
transform: PassThroughInitialTransforms,
239+
transform: PassThroughInitialTransforms & { setProtocol?: string },
240240
{ isH2Downstream, rawHeaders, port, protocol, hostname, pathname, query }: {
241241
isH2Downstream: boolean,
242242
rawHeaders: RawHeaders,

0 commit comments

Comments
 (0)