update pay function
This commit is contained in:
58
src/views/AgentChat/neuratalk/next.config.js
Normal file
58
src/views/AgentChat/neuratalk/next.config.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
// 开发环境先不设置 basePath,方便测试
|
||||
// basePath: '/ai-chat',
|
||||
// assetPrefix: '/ai-chat/',
|
||||
|
||||
// 启用严格模式
|
||||
reactStrictMode: true,
|
||||
|
||||
// 生产环境优化
|
||||
poweredByHeader: false,
|
||||
|
||||
// 解决多个 lockfile 警告
|
||||
outputFileTracingRoot: '/home/ubuntu/vf_react/src/views/AgentChat/neuratalk',
|
||||
|
||||
// 环境变量
|
||||
env: {
|
||||
NEXT_PUBLIC_BASE_PATH: '',
|
||||
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || 'http://localhost:5001',
|
||||
NEXT_PUBLIC_MAIN_APP_URL: process.env.NEXT_PUBLIC_MAIN_APP_URL || 'https://valuefrontier.cn',
|
||||
},
|
||||
|
||||
// 重写规则 - 将 API 请求代理到后端
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: 'http://localhost:5001/api/:path*',
|
||||
},
|
||||
{
|
||||
source: '/mcp/:path*',
|
||||
destination: 'http://localhost:8900/:path*',
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
// 配置允许的域名(用于 Next.js Image 组件)
|
||||
images: {
|
||||
domains: ['valuefrontier.cn', 'localhost'],
|
||||
},
|
||||
|
||||
// 允许跨域请求(开发环境)
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
source: '/:path*',
|
||||
headers: [
|
||||
{
|
||||
key: 'Access-Control-Allow-Origin',
|
||||
value: '*',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
Reference in New Issue
Block a user