mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +01:00
Allow CORS everywhere!
This commit is contained in:
parent
480385559d
commit
ca57f598d2
@ -30,14 +30,16 @@ router.get('/skins/:uuid.:ext?', function(req, res) {
|
|||||||
'Location': "http://textures.minecraft.net/texture/" + hash,
|
'Location': "http://textures.minecraft.net/texture/" + hash,
|
||||||
'Cache-Control': 'max-age=' + config.browser_cache_time + ', public',
|
'Cache-Control': 'max-age=' + config.browser_cache_time + ', public',
|
||||||
'Response-Time': new Date() - start,
|
'Response-Time': new Date() - start,
|
||||||
'X-Storage-Type': human_status[status]
|
'X-Storage-Type': human_status[status],
|
||||||
|
'Access-Control-Allow-Origin': "*"
|
||||||
});
|
});
|
||||||
res.end();
|
res.end();
|
||||||
} else if (!err) {
|
} else if (!err) {
|
||||||
res.writeHead(404, {
|
res.writeHead(404, {
|
||||||
'Cache-Control': 'max-age=' + config.browser_cache_time + ', public',
|
'Cache-Control': 'max-age=' + config.browser_cache_time + ', public',
|
||||||
'Response-Time': new Date() - start,
|
'Response-Time': new Date() - start,
|
||||||
'X-Storage-Type': human_status[status]
|
'X-Storage-Type': human_status[status],
|
||||||
|
'Access-Control-Allow-Origin': "*"
|
||||||
});
|
});
|
||||||
res.end("404 Not found");
|
res.end("404 Not found");
|
||||||
} else {
|
} else {
|
||||||
@ -97,7 +99,8 @@ router.get('/avatars/:uuid.:ext?', function(req, res) {
|
|||||||
'Cache-Control': 'max-age=' + config.browser_cache_time + ', public',
|
'Cache-Control': 'max-age=' + config.browser_cache_time + ', public',
|
||||||
'Response-Time': new Date() - start,
|
'Response-Time': new Date() - start,
|
||||||
'X-Storage-Type': human_status[img_status],
|
'X-Storage-Type': human_status[img_status],
|
||||||
'Location': def
|
'Location': def,
|
||||||
|
'Access-Control-Allow-Origin': "*"
|
||||||
});
|
});
|
||||||
res.end();
|
res.end();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user