解决中文编码问题
This commit is contained in:
parent
31095c967e
commit
43435af89b
@ -104,7 +104,7 @@ export function createProxyServer(): http.Server {
|
||||
clientRes.writeHead(mockStatusCode, {
|
||||
...proxyRes.headers,
|
||||
"X-Mock-Autogenerated": "true",
|
||||
"X-Mock-Source": mockFile,
|
||||
"X-Mock-Source": encodeURIComponent(mockFile),
|
||||
"X-Mock-Status-Code": String(mockStatusCode),
|
||||
});
|
||||
clientRes.end(bodyBuffer);
|
||||
@ -140,7 +140,7 @@ export function createProxyServer(): http.Server {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
|
||||
"Access-Control-Allow-Headers": "Content-Type",
|
||||
"X-Mock-Source": mockFile,
|
||||
"X-Mock-Source": encodeURIComponent(mockFile),
|
||||
"X-Mock-Status-Code": String(mockStatusCode),
|
||||
"X-Mock-Timestamp": new Date().toISOString(),
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user