Skip to content

Commit 4a4cb38

Browse files
committed
Fixed a bug releated to header merging
1 parent f7e1485 commit 4a4cb38

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

assembly/helper.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import {Utils} from "./sdk/QueueITHelpers";
2-
import {hmacString} from "./sdk/helpers/crypto";
3-
4-
export class QueueITHelper {
5-
static readonly KUP_VERSION: string = "fastly-1.0.0";
6-
7-
static configureKnownUserHashing(): void {
8-
Utils.generateSHA256Hash = hmacString;
9-
}
10-
11-
static addKUPlatformVersion(redirectQueueUrl: string): string {
12-
return redirectQueueUrl + "&kupver=" + QueueITHelper.KUP_VERSION;
13-
}
14-
}
15-
16-
export interface RequestLogger {
17-
log(message: string): void;
18-
}
1+
import { Utils } from "./sdk/QueueITHelpers";
2+
import { hmacString } from "./sdk/helpers/crypto";
3+
4+
export class QueueITHelper {
5+
static readonly KUP_VERSION: string = "fastly-1.0.3";
6+
7+
static configureKnownUserHashing(): void {
8+
Utils.generateSHA256Hash = hmacString;
9+
}
10+
11+
static addKUPlatformVersion(redirectQueueUrl: string): string {
12+
return redirectQueueUrl + "&kupver=" + QueueITHelper.KUP_VERSION;
13+
}
14+
}
15+
16+
export interface RequestLogger {
17+
log(message: string): void;
18+
}

assembly/requestResponseHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,6 @@ export function onQueueITResponse(res: Response): void {
131131
if (contextHeaderKeys[i].length == 0) continue;
132132
let value = contextHeaders.get(contextHeaderKeys[i]);
133133
if (value != null && value!.length > 0)
134-
res.headers.set(contextHeaderKeys[i], value!);
134+
res.headers.append(contextHeaderKeys[i], value!);
135135
}
136136
}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@queue-it/fastly",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Queue-it connector for Fastly",
55
"main": "assembly/index.ts",
66
"ascMain": "assembly/index.ts",

0 commit comments

Comments
 (0)