Skip to content

Commit

Permalink
fix(proxy): don't accept encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
redallen committed Aug 31, 2021
1 parent 78862b2 commit 33cfd82
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/config-utils/standalone/services/default/chrome.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ module.exports.registerChrome = ({ app, chromePath, keycloakUri, https, proxyVer
app.use((req, res, next) => {
const ext = path.extname(req.url.replace(/\?.*/, ''));
if (req.method === 'GET' && ['', '.hmt', '.html'].includes(ext)) {
// We can't handle encoded responses without a big gzip/zip/br dependency
delete req.headers['accept-encoding'];
function writeOrEnd(chunk, encoding, callback, oldFn) {
const ctype = res.getHeader('Content-Type');
if (ctype && ctype.includes('text/html') && !res.headersSent && !res.writableEnded) {
Expand Down

0 comments on commit 33cfd82

Please sign in to comment.