initialize Electron desktop app and remove unused files
Build / build (push) Canceled after 0s
Playwright / browser (push) Canceled after 0s

This commit is contained in:
2026-10-25 01:09:01 +08:00
commit 01d9e301fc
877 changed files with 262513 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import { readFileSync } from 'fs'
import { describe, expect, it } from 'vitest'
describe('vite proxy config', () => {
it('strips browser origin headers from proxied http and websocket requests', () => {
const source = readFileSync('vite.config.ts', 'utf8')
expect(source).toContain("proxy.on('proxyReq'")
expect(source).toContain("proxy.on('proxyReqWs'")
const httpProxyBlock = source.match(/proxy\.on\('proxyReq'[\s\S]*?\n\s*\}\)/)?.[0] || ''
const wsProxyBlock = source.match(/proxy\.on\('proxyReqWs'[\s\S]*?\n\s*\}\)/)?.[0] || ''
for (const block of [httpProxyBlock, wsProxyBlock]) {
expect(block).toContain("removeHeader('origin')")
expect(block).toContain("removeHeader('referer')")
}
})
})