Skip to content

Instantly share code, notes, and snippets.

@gregorskii
Created April 30, 2016 20:46
Show Gist options
  • Save gregorskii/3c4556f3566a4c2a7a35d586b5a274ff to your computer and use it in GitHub Desktop.
Save gregorskii/3c4556f3566a4c2a7a35d586b5a274ff to your computer and use it in GitHub Desktop.
Proxy Middleware example
import proxyMiddleware from 'http-proxy-middleware';
config.browserSyncConfig = {
proxy: {
target: '<DEST SITE>',
middleware: [proxyMiddleware(['<API PATH>'], {target: '<API TARGET>'})]
}
};
plugins.browserSync.init(config.browserSyncConfig);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment