From d4352e7189a1446720f99ab0ea21e5ba97adb281 Mon Sep 17 00:00:00 2001 From: JORDAAR <69628820+Jordaar@users.noreply.github.com> Date: Tue, 9 May 2023 12:23:37 +0530 Subject: [PATCH] Add X-Final-Destination header --- src/main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.js b/src/main.js index 83e2e65..90489a7 100644 --- a/src/main.js +++ b/src/main.js @@ -102,6 +102,9 @@ async function handleRequest(oRequest, destination, iteration = 0) { // Append to/Add Vary header so browser will cache response correctly response.headers.append('Vary', 'Origin'); + // Add X-Final-Destination header to get the final url + response.headers.set('X-Final-Destination', oResponse.url); + return response; }