iata added, todo fix location

This commit is contained in:
lyc8503 committed 2023-10-23 01:50:25 +08:00
1 parent 1d431a649f
commit aef4dedabe
5 files changed
+67 -45

No files matched your search

+1 -3
View File
@@ -2,10 +2,8 @@ async function getWorkerLocation() {
const res = await fetch('https://cloudflare.com/cdn-cgi/trace')
const text = await res.text()
const loc = /^loc=(.*)$/m.exec(text)?.[1]
const colo = /^colo=(.*)$/m.exec(text)?.[1]
return loc + '/' + colo
return colo
}
const fetchTimeout = (url: string, ms: number, { signal, ...options }: RequestInit<RequestInitCfProperties> | undefined = {}): Promise<Response> => {