Merge pull request #9 from Jordaar/dev

Add X-Final-Destination header to retrieve final redirected URL
This commit is contained in:
James Hawkins 2023-05-10 10:53:28 +01:00 committed by GitHub
commit 84e91bf422
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -102,6 +102,9 @@ async function handleRequest(oRequest, destination, iteration = 0) {
// Append to/Add Vary header so browser will cache response correctly // Append to/Add Vary header so browser will cache response correctly
response.headers.append('Vary', 'Origin'); 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; return response;
} }