[bug] Preserve Accept-Encoding from original request if not explicitly provided; Fix bug 77551

This commit is contained in:
Sergey Konovalov
2025-10-12 15:28:04 +03:00
parent 945e6d68b2
commit ead623b904

View File

@ -227,6 +227,11 @@ async function proxyRequest(req, res) {
// Merge key in headers
const headers = {...body.headers, ...providerHeaders};
// Preserve Accept-Encoding from original request if not explicitly provided
if (!headers['accept-encoding'] && req.headers['accept-encoding']) {
headers['accept-encoding'] = req.headers['accept-encoding'];
}
// use proxy instead of direct request
if (tenAiApiProxy) {
const tenTokenEnableOutbox = ctx.getCfg('services.CoAuthoring.token.enable.request.outbox', cfgTokenEnableOutbox);