优化
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user