[SPA] Adds Keep-Alive header to avoid console errors on Mac and Linux (#28)
The HPM proxy sends Connection: close headers and that results in Kestrel closing the connection and the proxy failing.
This commit is contained in:
Родитель
55da9ce020
Коммит
4f697716f5
|
@ -17,7 +17,10 @@ const PROXY_CONFIG = [
|
|||
//#endif
|
||||
],
|
||||
target: target,
|
||||
secure: false
|
||||
secure: false,
|
||||
headers: {
|
||||
Connection: 'Keep-Alive'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
@ -19,7 +19,10 @@ const context = [
|
|||
module.exports = function(app) {
|
||||
const appProxy = createProxyMiddleware(context, {
|
||||
target: target,
|
||||
secure: false
|
||||
secure: false,
|
||||
headers: {
|
||||
Connection: 'Keep-Alive'
|
||||
}
|
||||
});
|
||||
|
||||
app.use(appProxy);
|
||||
|
|
Загрузка…
Ссылка в новой задаче