-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnext.config.js
More file actions
59 lines (53 loc) · 1.75 KB
/
next.config.js
File metadata and controls
59 lines (53 loc) · 1.75 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* @Author: 齐大胜 782395122@qq.com
* @Date: 2024-12-28 20:00:04
* @LastEditors: 齐大胜 782395122@qq.com
* @LastEditTime: 2024-12-28 20:13:08
* @FilePath: /park-view1/next.config.js
* @Description:
*
* Copyright (c) 2024 by 齐大胜 email: 782395122@qq.com, All Rights Reserved.
*/
const createNextIntlPlugin = require('next-intl/plugin');
const withNextIntl = createNextIntlPlugin(
"./app/i18n/request.ts", // or './app/i18n/request.ts'
);
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
images: {
dangerouslyAllowSVG: true,
contentDispositionType: "attachment",
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
},
webpack: (config) => {
config.resolve.fallback = {
...config.resolve.fallback,
"pino-pretty": false,
};
return config;
},
// 添加 rewrites 配置
async rewrites() {
return [
{
source: "/park/v1/parking-spot", // 代理本地路径
destination: "http://localhost:8000/park/v1/parking-spot", // 目标后端路径
//destination: "https://park.matrix-net.tech/", // 目标后端路径
},
{
source: "/camaro/v1/file", // 代理本地路径
destination: "https://park.matrix-net.tech/camaro/v1/file", // 目标后端路径
//destination: "http://localhost:8000/park/v1/parking-spot", // 目标后端路径
},
];
},
};
//module.exports = nextConfig;
module.exports = withNextIntl(nextConfig);