[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:
Javier Calvarro Nelson 2021-11-12 19:55:19 +01:00 коммит произвёл GitHub
Родитель 55da9ce020
Коммит 4f697716f5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -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);