将文本翻译成日语
This commit is contained in:
@@ -8,9 +8,14 @@ export default defineConfig({
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://192.168.1.7:8088', // 请替换为你的实际后端服务器地址
|
||||
target: 'http://192.168.1.111:58080', // 请替换为你的实际后端服务器地址
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '/api')
|
||||
},
|
||||
'/baidu-translate': {
|
||||
target: 'https://fanyi-api.baidu.com', // 百度翻译API的基础地址
|
||||
changeOrigin: true, // 修改请求头中的Origin,模拟同源请求
|
||||
rewrite: (path) => path.replace(/^\/baidu-translate/, '') // 移除代理前缀
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user