mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
Fix http vs https
This commit is contained in:
parent
fd7fbc0f3c
commit
a40a3819d8
@ -6,7 +6,7 @@ var router = express.Router();
|
||||
router.get('/', function(req, res) {
|
||||
res.render('index', {
|
||||
title: 'Crafatar',
|
||||
domain: "https://" + req.headers.host,
|
||||
domain: req.secure ? "https" : "http" + "://" + req.headers.host,
|
||||
config: config
|
||||
});
|
||||
});
|
||||
|
||||
@ -14,8 +14,8 @@ config.http_timeout *= 3;
|
||||
// no spam
|
||||
logging.log = function(){};
|
||||
|
||||
var uuids = fs.readFileSync('test/uuids.txt').toString().split("\n");
|
||||
var usernames = fs.readFileSync('test/usernames.txt').toString().split("\n");
|
||||
var uuids = fs.readFileSync('test/uuids.txt').toString().split("\r\n");
|
||||
var usernames = fs.readFileSync('test/usernames.txt').toString().split("\r\n");
|
||||
// Get a random UUID + username in order to prevent rate limiting
|
||||
var uuid = uuids[Math.round(Math.random() * (uuids.length - 1))];
|
||||
console.log("using uuid '" + uuid + "'");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user