This commit is contained in:
2026-08-26 16:50:25 +08:00
parent 5868e774d4
commit 083299602d
31 changed files with 816 additions and 239 deletions
+5
View File
@@ -6,6 +6,11 @@ function loggedProxy(name, options) {
...options,
configure(proxy) {
proxy.on('proxyReq', (proxyRequest, request) => {
// The browser talks only to this same-origin Vite server. Forwarding its
// localhost Origin/Referer would make the upstream gateway run CORS
// validation again and reject the proxied request before Auth handles it.
proxyRequest.removeHeader('origin')
proxyRequest.removeHeader('referer')
console.info(`[Overseas PDA H5 proxy] ${name}`, `${request.method} ${request.url}`, '->', `${options.target}${proxyRequest.path}`)
})
proxy.on('proxyRes', (response, request) => {