From 19d6f2d25797b75a198a7e8bd142dc1d58ad4273 Mon Sep 17 00:00:00 2001 From: Michael Pretorius Date: Mon, 12 Aug 2024 14:47:40 +0200 Subject: [PATCH] fix: fix ipfs download link from cloudlfare to w3s --- src/handlers/ipfs_handler.ts | 2 +- src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/handlers/ipfs_handler.ts b/src/handlers/ipfs_handler.ts index ac43f10..b2e7284 100644 --- a/src/handlers/ipfs_handler.ts +++ b/src/handlers/ipfs_handler.ts @@ -22,7 +22,7 @@ export const getIpfsDocument = async (cid: string): Promise => { let res; try { - res = await axios.get(`https://${cid}.ipfs.cf-ipfs.com`, { + res = await axios.get(`https://${cid}.ipfs.w3s.link`, { responseType: "arraybuffer", }); // res = await axios.get(`https://ipfs.io/ipfs/${cid}`); diff --git a/src/index.ts b/src/index.ts index 5656999..8713510 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,8 +20,8 @@ import { postgresMigrate } from "./postgres/migrations"; SyncChain.syncChain().then(() => SyncBlocks.startSync()); const server = http.createServer(app); - server.keepAliveTimeout = 76000; // Set the keepalive timeout to 76 seconds - server.headersTimeout = 77000; // Set the headers timeout to 77 seconds + // server.keepAliveTimeout = 76000; // Set the keepalive timeout to 76 seconds + // server.headersTimeout = 77000; // Set the headers timeout to 77 seconds server.listen(PORT, () => console.log(`Listening on ${PORT}`)); })();