From 43e038078ecb1b07a11946035415333602a94c2e Mon Sep 17 00:00:00 2001 From: Alan Grainger Date: Tue, 29 Oct 2024 16:15:34 +0100 Subject: [PATCH] Add caching --- .env.example | 1 + README.md | 6 ++++++ dist/index.js | 4 +++- public/images/immich.png | Bin 0 -> 15114 bytes src/index.ts | 2 ++ 5 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 public/images/immich.png diff --git a/.env.example b/.env.example index 72a1784..7a87529 100644 --- a/.env.example +++ b/.env.example @@ -2,3 +2,4 @@ IMMICH_URL=http://localhost:2283 API_KEY="Get this from your Immich Account Settings page" SERVER_URL=https://shared.example.com SERVER_PORT=3000 +CACHE_AGE=2592000 diff --git a/README.md b/README.md index 5c4ff47..c258808 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Immich Public Proxy +

+ +

+ Immich is a wonderful bit of software, but since it holds all your private photos it's best to keep it fully locked down. This presents a problem when you want to share a photo or a gallery with someone. @@ -26,10 +30,12 @@ IMMICH_URL=http://localhost:2283 API_KEY="Get this from your Immich Account Settings page" SERVER_URL=https://shared.example.com SERVER_PORT=3000 +CACHE_AGE=2592000 ``` - `IMMICH_URL` is the URL to access Immich in your local network. This is not your public URL. - `SERVER_URL` will be the public URL for accessing this Immich Public Proxy app. +- `CACHE_AGE` by default, assets will be cached for 30 days. Set this to 0 to disable caching. 3. Start the docker container: diff --git a/dist/index.js b/dist/index.js index b2965e3..6b14de3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -15,6 +15,7 @@ const getSize = (req) => { return ((_a = req === null || req === void 0 ? void 0 : req.query) === null || _a === void 0 ? void 0 : _a.size) === 'thumbnail' ? types_1.ImageSize.thumbnail : types_1.ImageSize.original; }; app.get('/share/:key', (req, res) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { + res.set('Cache-Control', 'public, max-age=' + process.env.CACHE_AGE); if (!immich_1.default.isKey(req.params.key)) { res.status(404).send(); } @@ -43,6 +44,7 @@ app.get('/share/:key', (req, res) => tslib_1.__awaiter(void 0, void 0, void 0, f })); // Output the buffer data for an photo or video app.get('/:type(photo|video)/:key/:id', (req, res) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { + res.set('Cache-Control', 'public, max-age=' + process.env.CACHE_AGE); // Check for valid key and ID if (immich_1.default.isKey(req.params.key) && immich_1.default.isId(req.params.id)) { // Check if the key is a valid share link @@ -66,4 +68,4 @@ app.get('*', (_req, res) => { app.listen(3000, () => { console.log((0, dayjs_1.default)().format() + ' Server started'); }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsOERBQTZCO0FBQzdCLDhEQUE2QjtBQUM3Qiw4REFBNkI7QUFDN0IsMERBQXlCO0FBQ3pCLG1DQUE4QztBQUc5QyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUMsTUFBTSxFQUFFLENBQUE7QUFFMUIsTUFBTSxHQUFHLEdBQUcsSUFBQSxpQkFBTyxHQUFFLENBQUE7QUFDckIsR0FBRyxDQUFDLEdBQUcsQ0FBQyxhQUFhLEVBQUUsS0FBSyxDQUFDLENBQUE7QUFDN0IsR0FBRyxDQUFDLEdBQUcsQ0FBQyxpQkFBTyxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFBO0FBRWpDLE1BQU0sT0FBTyxHQUFHLENBQUMsR0FBWSxFQUFFLEVBQUU7O0lBQy9CLE9BQU8sQ0FBQSxNQUFBLEdBQUcsYUFBSCxHQUFHLHVCQUFILEdBQUcsQ0FBRSxLQUFLLDBDQUFFLElBQUksTUFBSyxXQUFXLENBQUMsQ0FBQyxDQUFDLGlCQUFTLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQyxpQkFBUyxDQUFDLFFBQVEsQ0FBQTtBQUNwRixDQUFDLENBQ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lY2sgdGhhdCB0aGUgcmVxdWVzdGVkIGFzc2V0IGV4aXN0cyBpbiB0aGlzIHNoYXJlXG4gICAgICBjb25zdCBhc3NldCA9IHNoYXJlZExpbmsuYXNzZXRzLmZpbmQoeCA9PiB4LmlkID09PSByZXEucGFyYW1zLmlkKVxuICAgICAgaWYgKGFzc2V0KSB7XG4gICAgICAgIGFzc2V0LnR5cGUgPSByZXEucGFyYW1zLnR5cGUgPT09ICd2aWRlbycgPyBBc3NldFR5cGUudmlkZW8gOiBBc3NldFR5cGUuaW1hZ2VcbiAgICAgICAgcmVuZGVyLmFzc2V0QnVmZmVyKHJlcywgYXNzZXQsIGdldFNpemUocmVxKSkudGhlbigpXG4gICAgICAgIHJldHVyblxuICAgICAgfVxuICAgIH1cbiAgfVxuICByZXMuc3RhdHVzKDQwNCkuc2VuZCgpXG59KVxuXG4vLyBTZW5kIGEgNDA0IGZvciBhbGwgb3RoZXIgdW5tYXRjaGVkIHJvdXRlc1xuYXBwLmdldCgnKicsIChfcmVxLCByZXMpID0+IHtcbiAgcmVzLnN0YXR1cyg0MDQpLnNlbmQoKVxufSlcblxuYXBwLmxpc3RlbigzMDAwLCAoKSA9PiB7XG4gIGNvbnNvbGUubG9nKGRheWpzKCkuZm9ybWF0KCkgKyAnIFNlcnZlciBzdGFydGVkJylcbn0pXG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsOERBQTZCO0FBQzdCLDhEQUE2QjtBQUM3Qiw4REFBNkI7QUFDN0IsMERBQXlCO0FBQ3pCLG1DQUE4QztBQUc5QyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUMsTUFBTSxFQUFFLENBQUE7QUFFMUIsTUFBTSxHQUFHLEdBQUcsSUFBQ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cmVxLnBhcmFtcy5pZClcbiAgICAgIGlmIChhc3NldCkge1xuICAgICAgICBhc3NldC50eXBlID0gcmVxLnBhcmFtcy50eXBlID09PSAndmlkZW8nID8gQXNzZXRUeXBlLnZpZGVvIDogQXNzZXRUeXBlLmltYWdlXG4gICAgICAgIHJlbmRlci5hc3NldEJ1ZmZlcihyZXMsIGFzc2V0LCBnZXRTaXplKHJlcSkpLnRoZW4oKVxuICAgICAgICByZXR1cm5cbiAgICAgIH1cbiAgICB9XG4gIH1cbiAgcmVzLnN0YXR1cyg0MDQpLnNlbmQoKVxufSlcblxuLy8gU2VuZCBhIDQwNCBmb3IgYWxsIG90aGVyIHVubWF0Y2hlZCByb3V0ZXNcbmFwcC5nZXQoJyonLCAoX3JlcSwgcmVzKSA9PiB7XG4gIHJlcy5zdGF0dXMoNDA0KS5zZW5kKClcbn0pXG5cbmFwcC5saXN0ZW4oMzAwMCwgKCkgPT4ge1xuICBjb25zb2xlLmxvZyhkYXlqcygpLmZvcm1hdCgpICsgJyBTZXJ2ZXIgc3RhcnRlZCcpXG59KVxuIl19 \ No newline at end of file diff --git a/public/images/immich.png b/public/images/immich.png new file mode 100644 index 0000000000000000000000000000000000000000..cbdc20bd5ea6b791cbf3782737de4c68dd76849f GIT binary patch literal 15114 zcmc(GhgVb0^YAYuU$I!bRM(ghR|0RicdPz32kP>KqoQk5nhX@XJ& zK@jN%>Am-m+&4bo-~aIDoSfutnc1D4*`1mD*=R$3Ee2X{S^xmUb!~NH0N~`ma6nB- z{@L~Wbxi)D@zA#L0)UR?-xmflUviQQVP3{ss-WZt?-Ka|aZg201%UEIx)XaO09UiG ztE-s$!PX{iy{v~a7PjuK33kbz>D`LZZ*#=Wm_BBh{kA=4+SjhdVZ!Fh{LUPALMw^) z9?QVJOS<^RU9uVey|e{>M?i@~S!7851-rrp>%tg?Bvb9H(QK*?#A}3%s{Jb!Ps&Lz z-&P&i1a55P$Bdvv&!{S|)V$vNa4(uXqW@2yu)7G%x%JbL#6Q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HJn8R8RtG$+X9RTJ5}<&JrWRi8syb*XN#{Ym zPU3(bM&Oc0Je$+~OZNZTQ-cwX4!Ava`D!zdDyH13&Q>^sIQy%?95I4~0jiXn6qnw< zXcyWEn|ShT)7Q|z1{-pd=gZ*|?;Z!~Yn9^~^IXVk6u^b{^CvYc&J*r^?WI}N3`nzA z8J&5_AAT0ti6KH27hO`)3-LXtrS^`bSSUW_=?tVHOZMyy5r8*_4z5)_TM<)<60`HWxB2%FRH|P573AwDB0h-FYL8$KTeo3ocs=>a5Yi-z(YFXj z_2zWLp)_7^-NycJlsf`ACR~9xe7ZM%TF~-l(hP5>2DMvpaT@xg;W))v!8(FO`=A*PK#FOq?-s!-~ zoTpCj{G4vX^Wjz^h*efq0T`Jg4oYvcUy`EYI**lR4*oVb`HoS-UX|lnOpI?gZZ~lb z+W*uNBVRl*4$wtCe3>GaA$vz;m1;2}Ro%U&^n143=|3aXgJ3kXjwT=KIM- zs6004cws53N#y6Uwu9@FuT4R(PihAHoXstlvJ0x?2sTgmFDq*gXxN-(`IuP}lpfc0 in%y7#|M?hJLX4W_Mb53qjc@*q;JSvsdWouC*#85sXwmfm literal 0 HcmV?d00001 diff --git a/src/index.ts b/src/index.ts index b088087..aeb741c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,6 +16,7 @@ const getSize = (req: Request) => { } app.get('/share/:key', async (req, res) => { + res.set('Cache-Control', 'public, max-age=' + process.env.CACHE_AGE) if (!immich.isKey(req.params.key)) { res.status(404).send() } else { @@ -41,6 +42,7 @@ app.get('/share/:key', async (req, res) => { // Output the buffer data for an photo or video app.get('/:type(photo|video)/:key/:id', async (req, res) => { + res.set('Cache-Control', 'public, max-age=' + process.env.CACHE_AGE) // Check for valid key and ID if (immich.isKey(req.params.key) && immich.isId(req.params.id)) { // Check if the key is a valid share link