BrowserSync / recipes

Fully working project examples showing how to use BrowserSync in various ways.
649 stars 140 forks source link

PHP gzip middleware #6

Open patrickjaja opened 9 years ago

patrickjaja commented 9 years ago

I have a gzip server response that is send to clients by apache, but not by browserSync proxy in development (its json encoded gzip content).

This is what i have now:

var browserSync = require('browser-sync');
browserSync({
    notify: false,
    logPrefix: packageJson.name,
    proxy: 'localhost', //Apache
    startPath: packageJson.appPath+'app',
    files: ["api/app/**/*.php"],
        middleware: require("connect-gzip")
  });

And before i have tryed the recipe for static content. https://github.com/BrowserSync/recipes/tree/master/recipes/server.gzipped.assets

Can you confirm me the right way to handle that with browserSync? Any experiences?

shakyShane commented 8 years ago

Do you mean skip the gzip when running through Browsersync?