[fix] git
This commit is contained in:
@@ -69,19 +69,18 @@ const proxyFunc = async (req, res, next) => {
|
|||||||
|
|
||||||
const originalBody = await originalResponse.text();
|
const originalBody = await originalResponse.text();
|
||||||
const head = new Headers(originalResponse.headers);
|
const head = new Headers(originalResponse.headers);
|
||||||
|
head.delete('content-security-policy');
|
||||||
|
head.delete('content-security-policy-report-only');
|
||||||
|
head.delete('clear-site-data');
|
||||||
|
head.delete('Cache-Control');
|
||||||
const headObj = {};
|
const headObj = {};
|
||||||
for (let [k, v] of head) {
|
for (let [k, v] of head) {
|
||||||
headObj[k] = v;
|
headObj[k] = v;
|
||||||
}
|
}
|
||||||
res.header(headObj);
|
res.header(headObj);
|
||||||
head.delete('content-security-policy');
|
|
||||||
head.delete('content-security-policy-report-only');
|
|
||||||
head.delete('clear-site-data');
|
|
||||||
head.delete('Cache-Control');
|
|
||||||
if(status < 200 || status >= 300){
|
if(status < 200 || status >= 300){
|
||||||
res.status(status)
|
res.status(status)
|
||||||
}
|
}
|
||||||
res.header(head)
|
|
||||||
res.send(originalBody);
|
res.send(originalBody);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user