Merge branch 'force_SSL' of https://github.com/wmantly/proxy into vagrant
This commit is contained in:
commit
729b6ecaba
@ -25,7 +25,10 @@ async function add(data){
|
||||
await client.SADD('hosts', data.host);
|
||||
await client.HSET('host_' + data.host, 'ip', data.ip);
|
||||
await client.HSET('host_' + data.host, 'updated', (new Date).getTime());
|
||||
await client.HSET('host_' + data.host, 'username', data.username);
|
||||
await client.HSET('host_' + data.host, 'username', data.username);
|
||||
if(data.forceSSL !== undefined){
|
||||
await client.HSET('host_' + data.host, 'force_ssl', !!data.forceSSL);
|
||||
}
|
||||
} catch (error){
|
||||
|
||||
return new Error(error);
|
||||
|
@ -35,7 +35,10 @@ router.post('/', async function(req, res){
|
||||
}
|
||||
|
||||
try{
|
||||
Host.add({host, ip, username: req.user.username});
|
||||
await Host.add({host, ip,
|
||||
username: req.user.username,
|
||||
forceSSL: req.body.forceSSL
|
||||
});
|
||||
|
||||
return res.json({
|
||||
message: `Host ${host} Added`
|
||||
|
Loading…
x
Reference in New Issue
Block a user