feat/op:uploads path use rewrite
This commit is contained in:
1 parent
3321efc3d4
commit
434518b2b3
1 file changed
+14
-12
+14
-12
@@ -19,18 +19,20 @@ const nextConfig = {
|
||||
async redirects() {
|
||||
return [];
|
||||
},
|
||||
// async rewrites() {
|
||||
// return [
|
||||
// {
|
||||
// source: "/api/:path*",
|
||||
// destination: `${process.env.NEXT_PUBLIC_API_URL || "http://127.0.0.1:8001"}/api/:path*`,
|
||||
// },
|
||||
// {
|
||||
// source: "/uploads/:path*",
|
||||
// destination: `${process.env.NEXT_PUBLIC_API_URL || "http://127.0.0.1:8001"}/uploads/:path*`,
|
||||
// },
|
||||
// ];
|
||||
// },
|
||||
async rewrites() {
|
||||
return [
|
||||
// {
|
||||
// source: "/api/:path*",
|
||||
// destination: `${process.env.NEXT_PUBLIC_API_URL || "http://127.0.0.1:8001"}/api/:path*`,
|
||||
// },
|
||||
{
|
||||
source: "/uploads/:path*",
|
||||
destination: `${
|
||||
process.env.NEXT_PUBLIC_API_URL || "http://127.0.0.1:8001"
|
||||
}/uploads/:path*`,
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
// Headers for better performance
|
||||
async headers() {
|
||||
|
||||
Reference in new issue
Block a user