cache-control should be private #1027

Closed
opened 2026-02-05 00:06:16 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @uhthomas on GitHub (Jun 29, 2023).

The bug

It looks like files and thumbnails have the cache-control header set to max-age=31536000. As a plain GET request, this implicitly implies the resource can be stored in shared/public caches.

Normally, non-authenticated users are not able to view files or thumbnails. However if Immich were to be served by Cloudflare or some other reverse proxy then it's possible the private data could be cached and served to unauthenticated users.

The cache control header should have , private to prevent this.

The OS that Immich Server is running on

N/A

Version of Immich Server

v1.64.0

Version of Immich Mobile App

N/A

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

N/A

Additional information

No response

Originally created by @uhthomas on GitHub (Jun 29, 2023). ### The bug It looks like files and thumbnails have the `cache-control` header set to `max-age=31536000`. As a plain GET request, this implicitly implies the resource can be stored in shared/public caches. Normally, non-authenticated users are not able to view files or thumbnails. However if Immich were to be served by Cloudflare or some other reverse proxy then it's possible the private data could be cached and served to unauthenticated users. The cache control header should have `, private` to prevent this. ### The OS that Immich Server is running on N/A ### Version of Immich Server v1.64.0 ### Version of Immich Mobile App N/A ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML N/A ``` ### Your .env content ```Shell N/A ``` ### Reproduction steps ```bash N/A ``` ### Additional information _No response_
OVERLORD added the 🗄️server label 2026-02-05 00:06:16 +03:00
Author
Owner

@uhthomas commented on GitHub (Jun 29, 2023):

These are the cache control headers Google Photos uses: private, max-age=86400, no-transform.

@uhthomas commented on GitHub (Jun 29, 2023): These are the cache control headers Google Photos uses: `private, max-age=86400, no-transform`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1027