File size: 771 Bytes
f09b9f0
 
 
 
 
 
 
 
 
 
d9b87de
 
 
 
 
a33dded
 
 
 
 
 
 
 
 
 
f09b9f0
 
 
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
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  /* config options here */
  // Enable standalone output for Docker deployment
  output: 'standalone',
  // Increase body size limit for API routes to handle large images
  serverRuntimeConfig: {
    bodySizeLimit: '50mb',
  },
  // Expose HuggingFace OAuth environment variables to the client
  // HF injects OAUTH_CLIENT_ID when hf_oauth: true is set in README
  env: {
    NEXT_PUBLIC_OAUTH_CLIENT_ID: process.env.OAUTH_CLIENT_ID || process.env.NEXT_PUBLIC_OAUTH_CLIENT_ID || '',
  },
  // Redirect /editor to main page
  async redirects() {
    return [
      {
        source: '/editor',
        destination: '/',
        permanent: true,
      },
    ];
  },
};

export default nextConfig;