mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-07 16:16:37 +08:00
嵌入与邮箱
This commit is contained in:
+35
-31
@@ -1,39 +1,43 @@
|
||||
import type { NextConfig } from "next";
|
||||
import type {NextConfig} from "next";
|
||||
|
||||
const isExport = process.env.NEXT_STANDALONE_EXPORT === 'true';
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
reactCompiler: true,
|
||||
experimental: {
|
||||
},
|
||||
async rewrites() {
|
||||
const backendUrl = process.env.LINUX_DO_CREDIT_BACKEND_URL || 'http://localhost:8000';
|
||||
return [
|
||||
// 易支付兼容接口 - 创建订单
|
||||
{
|
||||
source: '/epay/pay/:path*',
|
||||
destination: `${ backendUrl }/pay/:path*`,
|
||||
},
|
||||
// 易支付兼容接口 - 查询订单和退款
|
||||
{
|
||||
source: '/epay/api.php',
|
||||
destination: `${ backendUrl }/api.php`,
|
||||
},
|
||||
// Credit 协议接口 - 商户分发
|
||||
{
|
||||
source: '/lpay/distribute',
|
||||
destination: `${ backendUrl }/pay/distribute`,
|
||||
},
|
||||
// 上传文件静态资源
|
||||
{
|
||||
source: '/f/:id',
|
||||
destination: `${ backendUrl }/f/:id`,
|
||||
},
|
||||
// 标准 RESTful API 接口
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: `${ backendUrl }/api/:path*`,
|
||||
}
|
||||
];
|
||||
},
|
||||
...(isExport ? { output: 'export' } : {
|
||||
async rewrites() {
|
||||
const backendUrl = process.env.LINUX_DO_CREDIT_BACKEND_URL || 'http://localhost:8000';
|
||||
return [
|
||||
// 易支付兼容接口 - 创建订单
|
||||
{
|
||||
source: '/epay/pay/:path*',
|
||||
destination: `${ backendUrl }/pay/:path*`,
|
||||
},
|
||||
// 易支付兼容接口 - 查询订单和退款
|
||||
{
|
||||
source: '/epay/api.php',
|
||||
destination: `${ backendUrl }/api.php`,
|
||||
},
|
||||
// Credit 协议接口 - 商户分发
|
||||
{
|
||||
source: '/lpay/distribute',
|
||||
destination: `${ backendUrl }/pay/distribute`,
|
||||
},
|
||||
// 上传文件静态资源
|
||||
{
|
||||
source: '/f/:id',
|
||||
destination: `${ backendUrl }/f/:id`,
|
||||
},
|
||||
// 标准 RESTful API 接口
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: `${ backendUrl }/api/:path*`,
|
||||
}
|
||||
];
|
||||
},
|
||||
})
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
Reference in New Issue
Block a user