mirror of
https://github.com/YuzuZensai/Minikura.git
synced 2026-09-13 18:59:25 +00:00
25 lines
478 B
JavaScript
25 lines
478 B
JavaScript
// @ts-check
|
|
|
|
/**
|
|
* @type {import('next').NextConfig}
|
|
*/
|
|
const nextConfig = {
|
|
async rewrites() {
|
|
const apiUrl = (process.env.API_URL || process.env.NEXT_PUBLIC_API_URL || "http://localhost:3000")
|
|
.replace(/\/$/, "");
|
|
|
|
return [
|
|
{
|
|
source: "/auth/:path*",
|
|
destination: `${apiUrl}/auth/:path*`,
|
|
},
|
|
{
|
|
source: "/api/:path*",
|
|
destination: `${apiUrl}/api/:path*`,
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|