https://github.com/drawveloper/connect-http-please
Follow redirects to https transparently and deliver them via http
https://github.com/drawveloper/connect-http-please
Last synced: about 1 year ago
JSON representation
Follow redirects to https transparently and deliver them via http
- Host: GitHub
- URL: https://github.com/drawveloper/connect-http-please
- Owner: drawveloper
- License: mit
- Created: 2014-05-06T03:01:21.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-08-03T22:10:02.000Z (almost 9 years ago)
- Last Synced: 2025-03-02T20:36:27.331Z (over 1 year ago)
- Language: CoffeeScript
- Size: 11.7 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
connect-http-please
================

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.*