This repository was archived by the owner on Jun 10, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!-- Please fill out one of the sections below based on the type of issue you're creating -->
2+ # Feature
3+ ## Why is this feature being added?
4+ <!-- What problem is it solving? What value does it add? -->
5+
6+ ## What should your feature do?
7+
8+ ---
9+
10+ # Bug Report
11+ ## What is the current behavior?
12+
13+ ## What is the expected behavior?
14+
15+ ## What steps did you take to get this behavior?
16+
17+ ## Additional Info
18+ ### Operating System
19+
20+ ### Browser
21+
22+ ### Screenshots
Original file line number Diff line number Diff line change 1+ # Description of changes
2+ <!-- What does this PR change and why -->
3+
4+ # Issue Resolved
5+ <!-- Keeping the format 'Fixes #123' will automatically close the issue when this PR is merged -->
6+ Fixes #
Original file line number Diff line number Diff line change @@ -4,8 +4,10 @@ const path = require('path');
44
55const app = express ( ) ;
66
7+ app . enable ( 'trust proxy' ) ;
8+
79app . use ( ( req , res , next ) => {
8- if ( ! req . secure ) {
10+ if ( req . headers [ 'x-forwarded-proto' ] !== 'https' ) {
911 return res . redirect ( `https://${ req . headers . host } ${ req . url } ` ) ;
1012 }
1113 return next ( ) ;
You can’t perform that action at this time.
0 commit comments