mirror of
https://github.com/bitinflow/server.git
synced 2026-03-13 13:35:53 +00:00
add --secure flag to indicate proxy can support https requests
When --secure is set, all urls will be sent back with https so use will use secure proxy.
This commit is contained in:
@@ -6,6 +6,10 @@ var debug = require('debug')('localtunnel');
|
||||
|
||||
var argv = optimist
|
||||
.usage('Usage: $0 --port [num]')
|
||||
.options('secure', {
|
||||
default: false,
|
||||
describe: 'use this flag to indicate proxy over https'
|
||||
})
|
||||
.options('port', {
|
||||
default: '80',
|
||||
describe: 'listen on this port for outside requests'
|
||||
@@ -18,7 +22,8 @@ if (argv.help) {
|
||||
}
|
||||
|
||||
var server = require('../server')({
|
||||
max_tcp_sockets: 5
|
||||
max_tcp_sockets: 5,
|
||||
secure: argv.secure
|
||||
});
|
||||
|
||||
server.listen(argv.port, function() {
|
||||
|
||||
Reference in New Issue
Block a user