Search code examples
httpwebservertunnelhttp-errorngrok

Ngrok net::ERR_CONTENT_LENGTH_MISMATCH errors


I'm trying to set up an ngrok tunnel to a locally run webserver serving on port 5000. I can access the website fine over localhost:5000, but when I set up an ngrok tunnel on port 5000 I get net::ERR_CONTENT_LENGTH_MISMATCH errors on all of the css and js resources in Chrome 46.0 and Safari 9.0.1.

I do not get these errors when accessing the ngrok link from Firefox 42.

Does anyone know why this is happening, and what I might do to fix it?


Solution

  • I've resolved this issue just with adding lines bellow in devServer config. So I've changed default express timeout, turned on compression and added proxy. Maybe this will help someone...

    keepAliveTimeout: 120000 * 5,
    compress: true,
    // Set this if you want to enable gzip compression for assets
    proxy: {
      '**': 'http://localhost:8080'
    }