fix bug
This commit is contained in:
+2
-2
@@ -51,7 +51,7 @@ async function fetchAndApply(host, request) {
|
|||||||
|
|
||||||
let response = null;
|
let response = null;
|
||||||
if (!CFproxy) {
|
if (!CFproxy) {
|
||||||
response = await fetch(request);
|
response = await fetch(f_url, request);
|
||||||
} else {
|
} else {
|
||||||
let method = request.method;
|
let method = request.method;
|
||||||
let body = request.body;
|
let body = request.body;
|
||||||
@@ -70,7 +70,7 @@ async function fetchAndApply(host, request) {
|
|||||||
let out_headers = new Headers(response.headers);
|
let out_headers = new Headers(response.headers);
|
||||||
if (out_headers.get('Content-Disposition')=='attachment') out_headers.delete('Content-Disposition');
|
if (out_headers.get('Content-Disposition')=='attachment') out_headers.delete('Content-Disposition');
|
||||||
let out_body = null;
|
let out_body = null;
|
||||||
let contentType = out_headers.get('content-type');
|
let contentType = out_headers.get('Content-Type');
|
||||||
if (contentType.includes("application/text")) {
|
if (contentType.includes("application/text")) {
|
||||||
out_body = await response.text();
|
out_body = await response.text();
|
||||||
while (out_body.includes(replace_path)) out_body = out_body.replace(replace_path, replaced_path);
|
while (out_body.includes(replace_path)) out_body = out_body.replace(replace_path, replaced_path);
|
||||||
|
|||||||
Reference in New Issue
Block a user