Added /users/me route, and handling auth in frontend
This commit is contained in:
@@ -3,19 +3,16 @@ import type { NextConfig } from "next";
|
||||
const nextConfig: NextConfig = {
|
||||
/* config options here */
|
||||
output: "standalone",
|
||||
async redirects() {
|
||||
if (!process.env.BACKEND_PORT) {
|
||||
throw new Error(
|
||||
"Environment variable BACKEND_PORT is not defined.",
|
||||
);
|
||||
}
|
||||
return [
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
source: "/api/:path",
|
||||
destination: `http://localhost:${process.env.BACKEND_PORT}/:path`,
|
||||
permanent: false,
|
||||
protocol: "https",
|
||||
hostname: "avatar.vercel.sh",
|
||||
},
|
||||
];
|
||||
],
|
||||
},
|
||||
env: {
|
||||
NEXT_PUBLIC_BACKEND_PORT: process.env.BACKEND_PORT,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user