Skip to content
This repository was archived by the owner on Jul 29, 2026. It is now read-only.
This repository was archived by the owner on Jul 29, 2026. It is now read-only.

Binary files are corrupted in dev mode #1636

Description

@Toub

Binary files dynamically generated and downloaded from the api are corrupted, due to connect-livereload trying to inject code into the binary.

The issue is discussed here: intesso/connect-livereload#39

This can be fixed by configuring connect-livereload to ignore /api path in server/config/express.js:

if ('development' === env) {
        app.use(require('connect-livereload')({
            ignore: [/^\/api\/(.*)/,
                /\.js(\?.*)?$/, /\.css(\?.*)?$/, /\.svg(\?.*)?$/, /\.ico(\?.*)?$/, /\.woff(\?.*)?$/,
                /\.png(\?.*)?$/, /\.jpg(\?.*)?$/, /\.jpeg(\?.*)?$/, /\.gif(\?.*)?$/, /\.pdf(\?.*)?$/
              ]
        }));
    }

To reproduce, simply download a binary from the api using res.download.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions