mirror of
https://github.com/azures04/crafatar.git
synced 2026-05-06 11:00:39 +02:00
support redirection for capes
This commit is contained in:
@@ -5,6 +5,7 @@ var cache = require("../cache");
|
||||
// GET cape request
|
||||
module.exports = function(req, callback) {
|
||||
var userId = (req.url.pathname.split("/")[2] || "").split(".")[0];
|
||||
var def = req.url.query.default;
|
||||
var rid = req.id;
|
||||
|
||||
if (!helpers.id_valid(userId)) {
|
||||
@@ -31,6 +32,7 @@ module.exports = function(req, callback) {
|
||||
status: status,
|
||||
body: image,
|
||||
type: image ? "image/png" : undefined,
|
||||
redirect: image ? undefined : def,
|
||||
hash: hash,
|
||||
err: err
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user