Skip to content

Commit 65d9714

Browse files
committed
fix(connection): update fetch URL for connection check and add timing logs
1 parent 57d74d2 commit 65d9714

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/workshop-utils/src/utils.server.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ export async function checkConnection({
2929
key: 'connected',
3030
ttl: 1000 * 10,
3131
async getFreshValue(context) {
32-
const response = await fetch('https://www.cloudflare.com', {
32+
console.time('checkConnection')
33+
const response = await fetch('https://one.one.one.one/cdn-cgi/trace', {
3334
method: 'HEAD',
3435
})
36+
console.timeEnd('checkConnection')
3537
if (response.ok) {
3638
context.metadata.ttl = 1000 * 60
3739
context.metadata.swr = 1000 * 60 * 30

0 commit comments

Comments
 (0)