@@ -9,14 +9,14 @@ var clients = {};
9
9
var lastView = "buzzer" ;
10
10
var lastGeoImage = "start.jpg" ;
11
11
12
- //Certificates for SSL
13
- const certkey = 'certs/privkey1.pem' ;
14
- const certchain = 'certs/fullchain1.pem' ;
15
-
16
12
//DNS record
17
- const dnshostname = 'iangray.me.uk ' ;
13
+ const dnshostname = 'christmasquiz.win ' ;
18
14
const hostaddress = '192.168.1.2' ;
19
15
16
+ //Certificates for SSL
17
+ const certkey = 'certs/archive/' + dnshostname + '/privkey1.pem' ;
18
+ const certchain = 'certs/archive/' + dnshostname + '/fullchain1.pem' ;
19
+
20
20
const wclientHttpsServer = https . createServer ( {
21
21
key : fs . readFileSync ( certkey , 'utf8' ) ,
22
22
cert : fs . readFileSync ( certchain , 'utf8' )
@@ -190,7 +190,7 @@ wclient.on('connection', function connection(ws, req) {
190
190
191
191
// Server to redirect HTTP requests to HTTPS
192
192
const http = express ( ) ;
193
- http . get ( '*' , function ( req , res ) {
193
+ http . get ( '*' , function ( req , res ) {
194
194
res . redirect ( 'https://' + req . headers . host + req . url ) ;
195
195
} ) ;
196
196
http . listen ( 80 , "0.0.0.0" , function ( ) {
@@ -215,9 +215,9 @@ dnsserver.on('request', function (request, response) {
215
215
//console.log("DNS request for " + request.question[0].name)
216
216
response . answer . push (
217
217
dns . A ( {
218
- //name: request.question[0].name,
218
+ //name: request.question[0].name,
219
219
name : dnshostname ,
220
- address : hostaddress ,
220
+ address : hostaddress ,
221
221
ttl : 10 } ) ) ;
222
222
response . send ( ) ;
223
223
} ) ;
0 commit comments