Skip to content

Support for brotliΒ #360

@aczekajski

Description

@aczekajski

Currently, if remote server returns response encoded with brotli algorithm (and sends header content-encoding set to br), the library does nothing to the response which is passed to userResDecorator. In effect, user must manually decompress it and compress it back before returning it from the callback function.

How about adding suport for brotli into express-http-proxy?

Compressing and decompressing with https://www.npmjs.com/package/iltorb package is as simple as doing:

var brotli = require('iltorb');
/* ... */
var decompressedBuffer = brotli.decompressSync(proxyResData);
var compressedBuffer = brotli.compressSync(decompressedBuffer);

I can propose a PR with added support if you approve it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions