From 0212a9af61b48cc8b62d1e84918c1131ff40adce Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Fri, 23 May 2025 16:56:26 -0700 Subject: [PATCH 1/3] fix: prevent cookie transfer during xml fetches --- src/lib/api/fetchRSS.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/api/fetchRSS.ts b/src/lib/api/fetchRSS.ts index 09d6ee43d88..7525ff34340 100644 --- a/src/lib/api/fetchRSS.ts +++ b/src/lib/api/fetchRSS.ts @@ -130,7 +130,10 @@ export const fetchRSS = async (xmlUrl: string | string[]) => { */ export const fetchXml = async (url: string) => { try { - const response = await fetch(url) + const response = await fetch(url, { + headers: { Cookie: "", DNT: "1" }, // Empty cookie header and do-not-track + credentials: "omit", // Don't send or receive cookies + }) const xml = await response.text() let returnObject: Record = {} parseString(xml, (err, result) => { From 34e9ea28c118559f80fddde35c290c5fe0b40386 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Mon, 26 May 2025 11:23:50 -0700 Subject: [PATCH 2/3] fix: no-referrer anonymous img loads --- app/[locale]/_components/home.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/[locale]/_components/home.tsx b/app/[locale]/_components/home.tsx index 3eab8b4151f..35e96f6b69e 100644 --- a/app/[locale]/_components/home.tsx +++ b/app/[locale]/_components/home.tsx @@ -651,6 +651,8 @@ const HomePage = ({ e.currentTarget.onerror = null e.currentTarget.src = EventFallback.src }} + referrerPolicy="no-referrer" + crossOrigin="anonymous" /> @@ -738,6 +740,8 @@ const HomePage = ({ }} className="max-w-full object-cover object-center" loading="lazy" + referrerPolicy="no-referrer" + crossOrigin="anonymous" /> ) : ( From 27324176d445a0efa8e09410668943207c32e97e Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Mon, 26 May 2025 11:24:22 -0700 Subject: [PATCH 3/3] fix: use internally hosted image --- .../the-graph-fixing-web3-data-querying/index.md | 11 ++--------- ...ials-the-graph-fixing-web3-data-querying-data.json | 4 ++++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/public/content/developers/tutorials/the-graph-fixing-web3-data-querying/index.md b/public/content/developers/tutorials/the-graph-fixing-web3-data-querying/index.md index 6f9e0e95a55..277da463a7b 100644 --- a/public/content/developers/tutorials/the-graph-fixing-web3-data-querying/index.md +++ b/public/content/developers/tutorials/the-graph-fixing-web3-data-querying/index.md @@ -3,14 +3,7 @@ title: "The Graph: Fixing Web3 data querying" description: Blockchain is like a database but without SQL. All the data is there, but no way to access it. Let me show you how to fix this with The Graph and GraphQL. author: Markus Waas lang: en -tags: - [ - "solidity", - "smart contracts", - "querying", - "the graph", - "react", - ] +tags: ["solidity", "smart contracts", "querying", "the graph", "react"] skill: intermediate published: 2020-09-06 source: soliditydeveloper.com @@ -90,7 +83,7 @@ First let's talk about GraphQL, originally designed and implemented by Facebook. ![GraphQL API vs. REST API](./graphql.jpg) - +![](./graphql-query.gif) The two images pretty much capture the essence of GraphQL. With the query on the right we can define exactly what data we want, so there we get everything in one request and nothing more than exactly what we need. A GraphQL server handles the fetching of all data required, so it is incredibly easy for the frontend consumer side to use. [This is a nice explanation](https://www.apollographql.com/blog/graphql-explained-5844742f195e/) of how exactly the server handles a query if you're interested. diff --git a/src/data/placeholders/content-developers-tutorials-the-graph-fixing-web3-data-querying-data.json b/src/data/placeholders/content-developers-tutorials-the-graph-fixing-web3-data-querying-data.json index ff0f3f30217..2b13c1cecef 100644 --- a/src/data/placeholders/content-developers-tutorials-the-graph-fixing-web3-data-querying-data.json +++ b/src/data/placeholders/content-developers-tutorials-the-graph-fixing-web3-data-querying-data.json @@ -22,5 +22,9 @@ "/content/developers/tutorials/the-graph-fixing-web3-data-querying/thegraph-explorer.png": { "hash": "48f6c069", "base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAACXBIWXMAAAPoAAAD6AG1e1JrAAACJklEQVR4nAEbAuT9ABYRIRYQIhMPHRYTJA8RJwcIHwMCGAgGGwQDFwIBFAAAEwUEGAUEGAAAFAkIGw4NHwASM2EXOWwXN3ATLFxFPUZYUFNYUFNAOUNLSlpjX21oXnFJR1ZKQ1ZeWGlgVmhKQVQAP3fcSYf3S4b+M2O8rZp9u6aCvKeEno17087V7//31frsyMTIx667/8rg/9Hjxa25ADNmuD96yjx6zSdVmYl6ZX9yWG1fR3NoW6uor3G/o0G1jJWjpKqKn9KIp9Rckad8lAA2W4pCZpQpWIoXP2lhV055bl1cUT5JPDh6goVZn4ZooIt3fH6EX3WthpWhZH14UGgAGB1IKy5YJCpTEBc9LCwuLzczLTozKiovQTxJTE5RQkRINzFASkRPYFBZVEtOQjhGACd8Vi6LXDCPXR5lT0ooPZlDSpMmR0cbQYKBk6edqqWbqId/kEpBXjEiQTQlQ1NFYABT3nJh/Xpl/4BBt2nGXUr/eVf/glG8UlS9ub1zb2h9e3O/u76jlKZkn5JymY+llKUAO6ldQLRhQrddLYpQqnx2u2KByGdIqlVUTUlTFxcWGBgVUUxUQ0JWM5RyMHxcNi1CAC1+UESWYSl/PhlaOH9xbZ51cY1WZmIlNmRjaD88OSQjH09ITy4tPTpdUR08MBURIAARPi0ZSzQSRy8IListGSFJKiVFJicoFSVCQExHQUZIRUhCPEkaEiUeKy0aICUaECI8o7+y+wRmBAAAAABJRU5ErkJggg==" + }, + "/content/developers/tutorials/the-graph-fixing-web3-data-querying/graphql-query.gif": { + "hash": "15d03461", + "base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAACXBIWXMAAAPoAAAD6AG1e1JrAAABAklEQVR4nGMwM7f4LyUl9V9SknSsoKj0n8HG2vZ/c3Pz/3nz5v6fOnUK0XjevNn/i4qK/jNMmTL1f2Zm5n8PD4//pIKjR4/9Z+jt7fs/f/78/wkJCf+/fv1KNAaBfXv3/WfIysr6/+DBfZJtR3EBCMBMJdmAoqLi/9evX/t/9uyZ/8ePHft/5MgRovC5c+f+z5wx8z9DT0/P/6XLV4Hx9evX/7979+7/z+8//3/79u3/j+/fCbtg/vwF/7fv3PNfTc/0/9p16/9Pau3531xW+z/Yxfd/aXr+/xfPnhP2wuvXr+GCINvRQxuvAdOmTSct5NANaGlpAwbIBaIDDzkQQd4HAMXFfREF8kXGAAAAAElFTkSuQmCC" } } \ No newline at end of file