mirror of
https://github.com/p-stream/simple-proxy.git
synced 2026-05-11 21:00:56 +00:00
Add X-Final-Destination header
This commit is contained in:
parent
256e6307f6
commit
d4352e7189
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue