Skip to content

Commit

Permalink
Fixed a bug releated to header merging
Browse files Browse the repository at this point in the history
  • Loading branch information
sp0x committed Oct 27, 2022
1 parent f7e1485 commit 4a4cb38
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
36 changes: 18 additions & 18 deletions assembly/helper.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import {Utils} from "./sdk/QueueITHelpers";
import {hmacString} from "./sdk/helpers/crypto";

export class QueueITHelper {
static readonly KUP_VERSION: string = "fastly-1.0.0";

static configureKnownUserHashing(): void {
Utils.generateSHA256Hash = hmacString;
}

static addKUPlatformVersion(redirectQueueUrl: string): string {
return redirectQueueUrl + "&kupver=" + QueueITHelper.KUP_VERSION;
}
}

export interface RequestLogger {
log(message: string): void;
}
import { Utils } from "./sdk/QueueITHelpers";
import { hmacString } from "./sdk/helpers/crypto";

export class QueueITHelper {
static readonly KUP_VERSION: string = "fastly-1.0.3";

static configureKnownUserHashing(): void {
Utils.generateSHA256Hash = hmacString;
}

static addKUPlatformVersion(redirectQueueUrl: string): string {
return redirectQueueUrl + "&kupver=" + QueueITHelper.KUP_VERSION;
}
}

export interface RequestLogger {
log(message: string): void;
}
2 changes: 1 addition & 1 deletion assembly/requestResponseHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,6 @@ export function onQueueITResponse(res: Response): void {
if (contextHeaderKeys[i].length == 0) continue;
let value = contextHeaders.get(contextHeaderKeys[i]);
if (value != null && value!.length > 0)
res.headers.set(contextHeaderKeys[i], value!);
res.headers.append(contextHeaderKeys[i], value!);
}
}
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@queue-it/fastly",
"version": "1.0.2",
"version": "1.0.3",
"description": "Queue-it connector for Fastly",
"main": "assembly/index.ts",
"ascMain": "assembly/index.ts",
Expand Down

0 comments on commit 4a4cb38

Please sign in to comment.