File size: 886 Bytes
857939a
 
 
 
 
17e5473
857939a
 
 
 
 
 
 
 
 
 
 
 
 
17e5473
 
 
 
 
857939a
 
 
 
 
 
 
 
 
17e5473
857939a
 
 
 
 
 
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
31
32
33
34
35
36
37
38
39
40
41
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  output: "standalone",
  images: {
    domains: ['localhost', '127.0.0.1'],
    remotePatterns: [
      {
        protocol: 'http',
        hostname: 'localhost',
        port: '8000',
        pathname: '/api/v1/images/download/**',
      },
      {
        protocol: 'http',
        hostname: '127.0.0.1',
        port: '8000',
        pathname: '/api/v1/images/download/**',
      },
      {
        protocol: 'http',
        hostname: '*',
        pathname: '/api/v1/images/download/**',
      },
    ],
  },
  rewrites: async () => {
    return [
      {
        source: "/api/:path*",
        destination:
          process.env.NODE_ENV === "development"
            ? "http://localhost:8000/api/:path*"
            : "http://localhost:8000/api/:path*",
      },
    ];
  },
};

export default nextConfig;