We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a45315e commit 5c70690Copy full SHA for 5c70690
apps/website/.gitignore
@@ -17,4 +17,7 @@
17
18
npm-debug.log*
19
yarn-debug.log*
20
-yarn-error.log*
+yarn-error.log*
21
+
22
+# cloudflare
23
+.wrangler
apps/website/functions/grind75/[[catchall]].js
@@ -0,0 +1,13 @@
1
+const SOURCE_HOST = 'https://grind75.vercel.app';
2
3
+export async function onRequest(context) {
4
+ const { request } = context;
5
+ // Define the original and target paths
6
+ const url = new URL(request.url);
7
8
+ // Rewrite to the new domain, preserving the original path and query string
9
+ const newURL = SOURCE_HOST + url.pathname + url.search;
10
11
+ // Fetch the content from the new domain
12
+ return await fetch(newURL, request);
13
+}
0 commit comments