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 { loadNightscoutSettings, nightscoutApiTokenSetting, nightscoutSiteUrlSetting } from "../ui/dashboard-settings";
|
||||
import { fetchWithUserAgent } from "../util/http";
|
||||
|
||||
export type NightscoutPoint = {
|
||||
timestampMs: number;
|
||||
@@ -292,7 +293,7 @@ export class NightscoutBridge {
|
||||
}
|
||||
|
||||
async function fetchJson<T>(url: string): Promise<T> {
|
||||
const response = await fetch(url);
|
||||
const response = await fetchWithUserAgent(url);
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP ${response.status}`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user