File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ Server-side config.js settings
9797| testport | ` 3000 ` | debug web port, fallback to this when not set in environment |
9898| testsslport | ` 3001 ` | debug web ssl port, fallback to this when not set in environment |
9999| usessl | ` true ` or ` false ` | set to use ssl |
100+ | protocolusessl | ` true ` or ` false ` | set to use ssl protocol |
100101| urladdport | ` true ` or ` false ` | set to add port on oauth callback url |
101102| debug | ` true ` or ` false ` | set debug mode, show more logs |
102103| usecdn | ` true ` or ` false ` | set to use CDN resources or not |
Original file line number Diff line number Diff line change @@ -7,11 +7,12 @@ var testport = '3000';
77var testsslport = '3001' ;
88var port = process . env . PORT || testport ;
99var sslport = process . env . SSLPORT || testsslport ;
10- var usessl = false ;
10+ var usessl = false ; // use node https server
11+ var protocolusessl = false ; // use ssl protocol
1112var urladdport = true ; //add port on getserverurl
1213
1314var config = {
14- debug : true ,
15+ debug : false ,
1516 usecdn : false ,
1617 version : '0.3.4' ,
1718 domain : domain ,
@@ -26,12 +27,14 @@ var config = {
2627 sslcapath : [ 'change this' ] ,
2728 dhparampath : 'change this' ,
2829 usessl : usessl ,
30+ protocolusessl : protocolusessl ,
2931 getserverurl : function ( ) {
32+ var protocol = protocolusessl ? 'https://' : 'http://' ;
3033 var url = domain ;
3134 if ( usessl )
32- url = 'https://' + url + ( sslport == 443 || ! urladdport ? '' : ':' + sslport ) ;
35+ url = protocol + url + ( sslport == 443 || ! urladdport ? '' : ':' + sslport ) ;
3336 else
34- url = 'http://' + url + ( port == 80 || ! urladdport ? '' : ':' + port ) ;
37+ url = protocol + url + ( port == 80 || ! urladdport ? '' : ':' + port ) ;
3538 if ( urlpath )
3639 url = url + '/' + urlpath ;
3740 return url ;
You can’t perform that action at this time.
0 commit comments