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

connect-http-please

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-http-please

Follow redirects to https transparently and deliver them via http

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
44
decreased by-45%
Maintainers
2
Weekly downloads
 
Created
Source

connect-http-please

Build status

Follows HTTPS redirects for you, seamlessly.

Idea

Don't want to enter HTTPS while in development?
Don't want to fiddle around self-signed certificates for your HTTPS proxy?

Add connect-http-please to your middleware chain and it will follow HTTPS redirects for you.

Usage

httplease = require 'connect-http-please'

(...)

middlewares = [
    httplease()
    myproxy( { to: 'somesite.com' } )
  ]
  
(...)

server.listen(80)
  

Now, imagine your browser issues a request to localhost/secure.
This gets proxied to somesite.com/secure.
However, somesite.com/secure won't accept HTTP: instead, it sends a

301 - location: https://somesite.com/secure

Then, connect-http-please detects that this is

  • a redirect (301/302) to
  • to the exact same URI
  • changing to HTTPS protocol

So, it saves your browser the trouble, fetches the content via HTTPS and returns your original request.
Your browser never knew he had to spoke HTTPS.

DISCLAIMER

This middleware is meant as a facilitator for DEVELOPMENT PURPOSES.
Do not use it in production or in critical environments.
Even though this middleware makes the requests via https, there's no guarantee of safety between your browser and this proxy.

You have been warned.

FAQs

Package last updated on 03 Aug 2017

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