New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-connect-proxy-with-headers

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-connect-proxy-with-headers

A simple proxy with headers middleware for gulp-connect

  • 10.4.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gulp-connect-proxy-with-headers

A simple proxy middleware for gulp-connect

support post request

pass cookie and other headers

How to use

gulp.task('connect', function () {
  connect.server({
    root: [conf.dist],
    port: 9000,
    livereload: true,
    middleware: function (connect, opt) {
      var Proxy = require('gulp-connect-proxy');
      opt.route = '/proxy';
      var proxy = new Proxy(opt);
      return [proxy];
    }
  });
});

Notes:

opt.route is optional, if omitted requests made to http://localhost:9000/foo.com/bar.png will be proxied.

If opt.route is set requests made to http://localhost:9000/proxy/foo.com/bar.png will be proxied.

This is for development purposes only. If you need a proxy in production use Nginx or Apache.

TODO:

  • Write Tests

Keywords

FAQs

Package last updated on 03 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc