fix(GOV-009): 完成脚手架审查整改
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// @vitest-environment node
|
||||
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import viteConfig from '../vite.config';
|
||||
|
||||
describe('Vite 本地 API 代理', () => {
|
||||
it('通过同源 /api 转发到本地 NestJS,避免浏览器依赖跨域配置', () => {
|
||||
expect(viteConfig.server?.proxy).toMatchObject({
|
||||
'/api': {
|
||||
target: 'http://127.0.0.1:3000',
|
||||
changeOrigin: false,
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user