forked from Blendman974/faceclaw
HTTP requests identify Faceclaw in their user-agent string
This commit is contained in:
1 parent
c27dcacfee
commit
8cdee2a701
14 files changed
+115
-9
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { Application } from "@nativescript/core";
|
||||
import { fetchWithUserAgent } from "../../util/http";
|
||||
|
||||
declare const android: any;
|
||||
declare const androidx: any;
|
||||
@@ -74,7 +75,7 @@ async function downloadAndOpenPdf(url: string, appName: string, activity: any):
|
||||
});
|
||||
let response: Response;
|
||||
try {
|
||||
response = await Promise.race([fetch(url), timeout]);
|
||||
response = await Promise.race([fetchWithUserAgent(url), timeout]);
|
||||
} finally {
|
||||
if (timeoutHandle) clearTimeout(timeoutHandle);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user