Add pools

This commit is contained in:
kwaroran
2024-12-08 15:46:54 +09:00
parent 8d5fb1a139
commit 0c62b8bbfe
6 changed files with 33 additions and 7 deletions

View File

@@ -906,6 +906,7 @@ async function fetchWithProxy(url: string, arg: GlobalFetchArgs): Promise<Global
"risu-url": encodeURIComponent(url),
"Content-Type": arg.body instanceof URLSearchParams ? "application/x-www-form-urlencoded" : "application/json",
...(arg.useRisuToken && { "x-risu-tk": "use" }),
"risu-pool": DBState.db.risuPool ? 'true' : 'false'
};
const body = arg.body instanceof URLSearchParams ? arg.body.toString() : JSON.stringify(arg.body);