Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
frankieroberto committed Feb 14, 2025
1 parent 307c977 commit f4106a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/middleware/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ function production(req, res, next) {
console.log(req.headers)

Check warning on line 14 in lib/middleware/production.js

View workflow job for this annotation

GitHub Actions / Code style checks

Unexpected console statement

Check failure on line 14 in lib/middleware/production.js

View workflow job for this annotation

GitHub Actions / Code style checks

Missing semicolon

// Redirect to HTTPS if page requested over HTTP
// This relies on the X-Forwarded-Proto HTTP header as hosts
// like Heroku place apps behind a load balance which uses HTTPS
// internally. The X-Forwarded-Proto reveals the protocol of the
// original request.
if (req.headers['x-forwarded-proto'] === 'http') {
return res.redirect(302, 'https://' + req.get('Host') + req.url)

Check failure on line 22 in lib/middleware/production.js

View workflow job for this annotation

GitHub Actions / Code style checks

Unexpected string concatenation

Check failure on line 22 in lib/middleware/production.js

View workflow job for this annotation

GitHub Actions / Code style checks

Missing semicolon
} else {

Check failure on line 23 in lib/middleware/production.js

View workflow job for this annotation

GitHub Actions / Code style checks

Unnecessary 'else' after 'return'
Expand Down

0 comments on commit f4106a1

Please sign in to comment.