Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next() for Localhost #22

Closed
grod220 opened this issue Dec 9, 2017 · 1 comment
Closed

Next() for Localhost #22

grod220 opened this issue Dec 9, 2017 · 1 comment

Comments

@grod220
Copy link

grod220 commented Dec 9, 2017

Whenever I use this package, it doesn't work in my local environment because https://localhost:### throws errors. Can we add another check like this?

if(req.headers && req.headers.host && req.headers.host === 'localhost:####') {
next();
}

@roelandmoors
Copy link

roelandmoors commented Mar 1, 2019

Maybe just do something like this?

if (app.get("env") === "production") {
   app.use(enforce.HTTPS({ trustProtoHeader: true }));
}

gorgorgordon added a commit to gorgorgordon/OlivieriPhoto-FrontEndDesign that referenced this issue Nov 17, 2020
Issue 1: Sequence of codes
enforce.HTTPS has to be called first
Ref: florianheinemann/express-sslify#25

Issue 2: Spelling mistake
env not enve
Ref: florianheinemann/express-sslify#22
@grod220 grod220 closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants