File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ async function fromArgs() {
79
79
} ,
80
80
acme,
81
81
title : ( x , xs ) => x || path . basename ( xs . cwd ) ,
82
- secure : ( x , xs ) => ! ! ( xs . ssl . cert || xs . acme . domains . length || xs . ssl . mode === 'optional ' ) ,
82
+ secure : ( x , xs ) => ! ! ( xs . ssl . cert || xs . acme . domains . length || xs . ssl . mode === 'manual ' ) ,
83
83
httpsPort : ( x , xs ) => x || ( xs . secure ? ( x ? parseInt ( x ) : ( xs . port || 443 ) ) : null ) ,
84
84
httpPort : ( x , xs ) => xs . secure && xs . ssl . mode === 'only' ? null : ( xs . secure ? 80 : x ? parseInt ( x ) : ( xs . port || 80 ) ) ,
85
85
address : x => x || env . ADDRESS || '0.0.0.0' ,
@@ -208,8 +208,8 @@ function getPort(x, config) {
208
208
209
209
function getMode ( x ) {
210
210
x = x || env . SSL_MODE || 'redirect'
211
- if ( ! 'only redirect optional ' . includes ( x ) )
212
- throw new Error ( 'SSL Mode must be: only | redirect | optional ' )
211
+ if ( ! 'only redirect manual ' . includes ( x ) )
212
+ throw new Error ( 'SSL Mode must be: only | redirect | manual ' )
213
213
return x
214
214
}
215
215
Original file line number Diff line number Diff line change @@ -64,9 +64,9 @@ async function listenHttp() {
64
64
} )
65
65
await redirect . listen ( config . httpPort , config . address )
66
66
console . log ( 'HTTP Redirecting to HTTPS on' , config . httpPort ) // eslint-disable-line
67
- } else if ( config . secure && config . ssl . mode === 'optional ' ) {
67
+ } else if ( config . secure && config . ssl . mode === 'manual ' ) {
68
68
await router . listen ( config . httpPort , config . address )
69
- console . log ( 'HTTP (optional ) listening on' , config . httpPort ) // eslint-disable-line
69
+ console . log ( 'HTTP (manual ssl ) listening on' , config . httpPort ) // eslint-disable-line
70
70
} else {
71
71
await router . listen ( config . httpPort , config . address )
72
72
console . log ( 'HTTP Listening on' , config . httpPort ) // eslint-disable-line
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ export default function Server({
127
127
128
128
port = parseInt ( port )
129
129
wrapper = wrap
130
- isSsl = ! ! ( o . cert || o . mode === 'optional ' )
130
+ isSsl = ! ! ( o . cert || o . mode === 'manual ' )
131
131
uws = isSsl
132
132
? uWS . SSLApp ( { cert_file_name : o . cert , key_file_name : o . key , ...o } )
133
133
: uWS . App ( o )
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ export default class Request {
146
146
}
147
147
148
148
get protocol ( ) {
149
- return this . options . cert || this . options . mode === 'optional '
149
+ return this . options . cert || this . options . mode === 'manual '
150
150
? 'https'
151
151
: header ( this , 'x-forwarded-proto' ) || 'http'
152
152
}
You can’t perform that action at this time.
0 commit comments