Add X-Final-Destination header

This commit is contained in:
JORDAAR 2023-05-09 12:23:37 +05:30 committed by GitHub
parent 256e6307f6
commit d4352e7189
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}