mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-11 08:43:04 +00:00
fix: env var exposed in next.config are undefined
This commit is contained in:
@@ -10,6 +10,7 @@ MYSQL_DATABASE="mylinks"
|
||||
|
||||
NEXTAUTH_URL="http://localhost:3000"
|
||||
NEXTAUTH_URL_INTERNAL="http://localhost:3000"
|
||||
NEXT_PUBLIC_API_URL="http://localhost:3000/api"
|
||||
|
||||
NEXTAUTH_SECRET=""
|
||||
|
||||
|
||||
@@ -20,13 +20,7 @@ const config = {
|
||||
formats: ["image/webp"]
|
||||
},
|
||||
reactStrictMode: false,
|
||||
experimental: {
|
||||
webpackBuildWorker: true
|
||||
},
|
||||
output: "standalone",
|
||||
env: {
|
||||
baseUrl: process.env.NEXTAUTH_URL
|
||||
}
|
||||
output: "standalone"
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export function faviconLinkBuilder(origin: string) {
|
||||
return `${process.env.baseUrl}/api/favicon?url=${origin}`;
|
||||
return `${process.env.NEXT_PUBLIC_API_URL}/favicon?url=${origin}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user