mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 01:00:34 +08:00
Fix: bail Firestore fetch out of HTTP cache
This commit is contained in:
parent
ff60e86a77
commit
0a00d8409a
@ -84,7 +84,7 @@ export const getTelegramCIDRPromise = once(async () => {
|
||||
|
||||
// Backup IP Source 3: Firebase Value Store (test server not supported)
|
||||
try {
|
||||
const json = await (await $$fetch('https://firestore.googleapis.com/v1/projects/reserve-5a846/databases/(default)/documents/ipconfig/v3', {
|
||||
const json = await (await fetch('https://firestore.googleapis.com/v1/projects/reserve-5a846/databases/(default)/documents/ipconfig/v3', {
|
||||
headers: {
|
||||
Accept: '*/*',
|
||||
Origin: undefined // Without this line, Google API will return "Bad request: Origin doesn't match Host for XD3.". Probably have something to do with sqlite cache store
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import picocolors from 'picocolors';
|
||||
import undici, {
|
||||
interceptors,
|
||||
Agent,
|
||||
setGlobalDispatcher
|
||||
Agent
|
||||
// setGlobalDispatcher
|
||||
} from 'undici';
|
||||
|
||||
import type {
|
||||
@ -25,7 +25,7 @@ if (!fs.existsSync(CACHE_DIR)) {
|
||||
|
||||
const agent = new Agent({ allowH2: true });
|
||||
|
||||
setGlobalDispatcher(agent.compose(
|
||||
(agent.compose(
|
||||
interceptors.dns({
|
||||
// disable IPv6
|
||||
dualStack: false,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user