adding headers on the backend

This commit is contained in:
2024-09-09 22:00:11 -06:00
parent b7eaae0ea4
commit 029e3ff7eb
4 changed files with 28 additions and 25 deletions

View File

@@ -1,12 +1,18 @@
/** @type {import('next').NextConfig} */
const token = process.env.NEXT_PUBLIC_CANVAS_TOKEN;
if (!token) {
throw new Error("CANVAS_TOKEN not in environment");
}
const nextConfig = {
async rewrites() {
return [
{
source: '/api/canvas/:rest*',
destination: 'https://snow.instructure.com/api/v1/:rest*',
source: "/api/canvas/:rest*",
destination: "https://snow.instructure.com/api/v1/:rest*",
},
]
];
},
};