mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 09:35:39 -05:00
This commit is contained in:
commit
4776741ea7
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ getTimeFromDaysAgo = (now, daysAgo) ->
|
||||||
t = now - 86400 * 1000 * daysAgo - LADDER_PREGAME_INTERVAL
|
t = now - 86400 * 1000 * daysAgo - LADDER_PREGAME_INTERVAL
|
||||||
|
|
||||||
isRequestFromDesignatedCronHandler = (req, res) ->
|
isRequestFromDesignatedCronHandler = (req, res) ->
|
||||||
requestIP = req.headers['x-forwarded-for'][0]
|
requestIP = req.headers['x-forwarded-for']?.replace(" ","").split(",")[0]
|
||||||
if requestIP isnt config.mail.cronHandlerPublicIP and requestIP isnt config.mail.cronHandlerPrivateIP
|
if requestIP isnt config.mail.cronHandlerPublicIP and requestIP isnt config.mail.cronHandlerPrivateIP
|
||||||
console.log "RECEIVED REQUEST FROM IP #{requestIP}(headers indicate #{req.headers['x-forwarded-for']}"
|
console.log "RECEIVED REQUEST FROM IP #{requestIP}(headers indicate #{req.headers['x-forwarded-for']}"
|
||||||
console.log "UNAUTHORIZED ATTEMPT TO SEND TRANSACTIONAL LADDER EMAIL THROUGH CRON MAIL HANDLER"
|
console.log "UNAUTHORIZED ATTEMPT TO SEND TRANSACTIONAL LADDER EMAIL THROUGH CRON MAIL HANDLER"
|
||||||
|
|
Loading…
Reference in a new issue