This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getIP(req) { | |
| var ip_address = (req.connection.remoteAddress ? req.connection.remoteAddress : req.remoteAddress); | |
| //check for cloudflare | |
| try { | |
| if (req.headers['cf-connecting-ip']) { | |
| var ipParts = ip_address.split("."); | |
| var cloudFlare = false; | |
| switch (parseInt(ipParts[0])) { | |
| case 204: | |
| //(204.93.177.0 - 204.93.177.255) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * def.js: Simple Ruby-style inheritance for JavaScript | |
| * | |
| * Copyright (c) 2010 Tobias Schneider | |
| * This script is freely distributable under the terms of the MIT license. | |
| * | |
| * | |
| * Example: | |
| * | |
| * def ("Person") ({ |
NewerOlder