Add 4 hour cache
This commit is contained in:
parent
4f599d4ff5
commit
ae8f16e64a
1 changed files with 4 additions and 2 deletions
6
index.js
6
index.js
|
@ -14,7 +14,8 @@ app.get('/characters/id/:charaId', async (req, res) => {
|
||||||
|
|
||||||
res.writeHead(200, {
|
res.writeHead(200, {
|
||||||
'Content-Type': 'image/png',
|
'Content-Type': 'image/png',
|
||||||
'Content-Length': png.length
|
'Content-Length': png.length,
|
||||||
|
'Cache-Control': 'public, max-age=14400'
|
||||||
});
|
});
|
||||||
res.end(png, 'binary');
|
res.end(png, 'binary');
|
||||||
}catch(error){
|
}catch(error){
|
||||||
|
@ -37,7 +38,8 @@ app.get('/characters/name/:world/:charName', async (req, res) => {
|
||||||
|
|
||||||
res.writeHead(200, {
|
res.writeHead(200, {
|
||||||
'Content-Type': 'image/png',
|
'Content-Type': 'image/png',
|
||||||
'Content-Length': png.length
|
'Content-Length': png.length,
|
||||||
|
'Cache-Control': 'public, max-age=14400'
|
||||||
});
|
});
|
||||||
res.end(png, 'binary');
|
res.end(png, 'binary');
|
||||||
}catch(error){
|
}catch(error){
|
||||||
|
|
Loading…
Reference in a new issue