@queue-it/fastly 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assembly/helper.ts +10 -10
- package/assembly/requestResponseHandler.ts +1 -1
- package/package.json +1 -1
package/assembly/helper.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {Utils} from "./sdk/QueueITHelpers";
|
|
2
|
-
import {hmacString} from "./sdk/helpers/crypto";
|
|
1
|
+
import { Utils } from "./sdk/QueueITHelpers";
|
|
2
|
+
import { hmacString } from "./sdk/helpers/crypto";
|
|
3
3
|
|
|
4
4
|
export class QueueITHelper {
|
|
5
|
-
|
|
5
|
+
static readonly KUP_VERSION: string = "fastly-1.0.3";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
static configureKnownUserHashing(): void {
|
|
8
|
+
Utils.generateSHA256Hash = hmacString;
|
|
9
|
+
}
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
static addKUPlatformVersion(redirectQueueUrl: string): string {
|
|
12
|
+
return redirectQueueUrl + "&kupver=" + QueueITHelper.KUP_VERSION;
|
|
13
|
+
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export interface RequestLogger {
|
|
17
|
-
|
|
17
|
+
log(message: string): void;
|
|
18
18
|
}
|
|
@@ -131,6 +131,6 @@ export function onQueueITResponse(res: Response): void {
|
|
|
131
131
|
if (contextHeaderKeys[i].length == 0) continue;
|
|
132
132
|
let value = contextHeaders.get(contextHeaderKeys[i]);
|
|
133
133
|
if (value != null && value!.length > 0)
|
|
134
|
-
res.headers.
|
|
134
|
+
res.headers.append(contextHeaderKeys[i], value!);
|
|
135
135
|
}
|
|
136
136
|
}
|