-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnext.config.ts
More file actions
30 lines (26 loc) · 834 Bytes
/
next.config.ts
File metadata and controls
30 lines (26 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Commenting out rewrites functionality
async rewrites() {
return [
{
source: "/api/:path*", // Match API calls starting with /api
destination: `${process.env.NEXT_PUBLIC_URL}/v1/api/:path*`, // Use the environment variable for the API URL
},
];
},
// Commenting out images configuration
images: {
remotePatterns: [
{
protocol: "https",
hostname: new URL(process.env.NEXT_PUBLIC_SUPABASE_STORAGE_URL || "")
.hostname, // Dynamically fetch the hostname from storage URL
pathname:
new URL(process.env.NEXT_PUBLIC_SUPABASE_STORAGE_URL || "").pathname +
"/**", // Match the storage path dynamically
},
],
},
};
export default nextConfig;