From 9852701114ee29a714e25fc4f785817f6b74d60f Mon Sep 17 00:00:00 2001 From: Nathan Sarang-Walters Date: Tue, 28 Jan 2025 16:28:58 -0800 Subject: [PATCH 1/2] Serve JSON schemas --- next.config.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/next.config.mjs b/next.config.mjs index 8ec2fd5..b9151dc 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -55,6 +55,11 @@ const nextConfig = { destination: "/catalog/assessments/:slug*", permanent: true, }, + { + source: "/schemas/:slug*", + destination: + "https://raw.githubusercontent.com/PrairieLearn/PrairieLearn/master/apps/prairielearn/src/schemas/schemas/:slug*", + }, ]; }, }; From 2bf15a3123249a079af5e2d42ad1fadcc3c1cd59 Mon Sep 17 00:00:00 2001 From: Nathan Sarang-Walters Date: Tue, 28 Jan 2025 16:41:56 -0800 Subject: [PATCH 2/2] Set permanent flag --- next.config.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/next.config.mjs b/next.config.mjs index b9151dc..840c5e5 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -59,6 +59,7 @@ const nextConfig = { source: "/schemas/:slug*", destination: "https://raw.githubusercontent.com/PrairieLearn/PrairieLearn/master/apps/prairielearn/src/schemas/schemas/:slug*", + permanent: false, }, ]; },