mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
adding headers on the backend
This commit is contained in:
@@ -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*",
|
||||
},
|
||||
]
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user