← back to Professional Directory

agents/web-agent/next.config.js

13 lines

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  // Proxy /api/* through to pd-api on loopback. In prod (Kamatera), pd-api
  // is on the same box at 127.0.0.1:9874. Override via PD_API_BASE.
  async rewrites() {
    return [
      { source: '/api/:path*', destination: (process.env.PD_API_BASE || 'http://127.0.0.1:9874') + '/:path*' },
    ];
  },
};
module.exports = nextConfig;