httpolyglot | Serve http and https connections | HTTP library
kandi X-RAY | httpolyglot Summary
kandi X-RAY | httpolyglot Summary
A module for serving http and https connections over the same port.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create a new server object .
- Global error handler .
httpolyglot Key Features
httpolyglot Examples and Code Snippets
Community Discussions
Trending Discussions on httpolyglot
QUESTION
I'm trying to get my Express app to redirect users to HTTPS when they visit the site on HTTP. I've looked at this question:
Automatic HTTPS connection/redirect with node.js/express
but it didn't quite have the answers I was looking for. I'm using httpolyglot:
https://github.com/mscdex/httpolyglot
because I want to do this on only one port, and httpolyglot is performing as advertised, but I can't get the redirect to work. Here's my code:
...ANSWER
Answered 2019-Mar-12 at 13:55Figured it out. My app.use function was in the code after some Express middleware that wasn't calling next(), so it wasn't getting called.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install httpolyglot
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page