From 57dedd3ab571f2981da45c7b1f33b66220329e7b Mon Sep 17 00:00:00 2001 From: capitanwesler Date: Mon, 31 May 2021 23:23:35 +0100 Subject: [PATCH] Setting cache-control in qwant --- README.md | 2 +- package.json | 2 +- src/controllers/UtilsController.ts | 1 + src/routes.ts | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2344cf2..3b85070 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# **Aruppi API** (v4.1.0) +# **Aruppi API** (v4.1.1) > This API has everything about Japan, from anime, music, radio, images, videos ... to japanese culture > diff --git a/package.json b/package.json index 40a572e..77796bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aruppi", - "version": "4.1.0", + "version": "4.1.1", "description": "Aruppi is a custom API to obtain data from the Japanese culture for the mobile app", "main": "./src/api/api.ts", "scripts": { diff --git a/src/controllers/UtilsController.ts b/src/controllers/UtilsController.ts index 48754ff..3faf599 100644 --- a/src/controllers/UtilsController.ts +++ b/src/controllers/UtilsController.ts @@ -263,6 +263,7 @@ export default class UtilsController { ); } + res.set('Cache-Control', 'max-age=604800'); res.status(200).json({ images: results }); } else { res.status(500).json({ message: 'Aruppi lost in the shell' }); diff --git a/src/routes.ts b/src/routes.ts index d053dc0..566b733 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -26,7 +26,7 @@ routes.get('/api/v4/', (req: Request, res: Response) => { res.json({ message: 'Aruppi /api - 🎏', author: 'Jéluchu', - version: '4.1.0', + version: '4.1.1', credits: 'The bitch loves /apis that offers data to Aruppi App', entries: [ {