https redirect
This commit is contained in:
parent
d016dd97eb
commit
63ac316959
@ -11,6 +11,15 @@ const io = new Server(server, {
|
|||||||
pingTimeout:5000
|
pingTimeout:5000
|
||||||
})
|
})
|
||||||
|
|
||||||
|
app.use(requireHTTPS);
|
||||||
|
|
||||||
|
function requireHTTPS(req, res, next) {
|
||||||
|
// The 'x-forwarded-proto' check is for Heroku
|
||||||
|
if (!req.secure && req.get('x-forwarded-proto') !== 'https' && process.env.NODE_ENV !== "development") {
|
||||||
|
return res.redirect('https://' + req.get('host') + req.url);
|
||||||
|
}
|
||||||
|
next();
|
||||||
|
}
|
||||||
// const port = 3000
|
// const port = 3000
|
||||||
|
|
||||||
app.use(express.static('public'))
|
app.use(express.static('public'))
|
||||||
|
BIN
public/ghost2.png
Normal file
BIN
public/ghost2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
@ -16,7 +16,7 @@ let row = 0;
|
|||||||
let readyNow = false
|
let readyNow = false
|
||||||
let animationFrame = 0;
|
let animationFrame = 0;
|
||||||
let pageVisible = true;
|
let pageVisible = true;
|
||||||
let debugMode = true;
|
let debugMode = false;
|
||||||
let timeoutHandle;
|
let timeoutHandle;
|
||||||
|
|
||||||
// let atPosition = true;
|
// let atPosition = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user