mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2026-04-25 15:05:56 +03:00
[GH-ISSUE #85] Include caching headers when serving image files #63
Labels
No labels
Feature request
Feature request
bug
cant reproduce
enhancement
help wanted
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pictshare#63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @thomasjsn on GitHub (Mar 8, 2019).
Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/85
It would be beneficial if caching headers were part of the response when serving image files;
As these files should be pretty much immutable. I can submit a pull request for this, if you point me to suitable method where this should be handles.
@thomasjsn commented on GitHub (Mar 8, 2019):
Ok, just an update, I added the following in my nginx config to set caching headers for images and videos.
Maybe just include this in the documentation and leave setting the cache headers out of the php code?
@dessalines commented on GitHub (Sep 8, 2019):
Would be good to add this to the nginx config here
@dessalines commented on GitHub (Sep 8, 2019):
I've found that I can't get this working with docker and a proxy_pass. Been trying things like a proxy_cache for a few hours...
@dessalines commented on GitHub (Sep 8, 2019):
These are the only headers pictshare is returning when using the proxy_pass with docker:
Its missing etag, cache-control, age
@geek-at commented on GitHub (Sep 23, 2019):
My idea was that your reverse proxy can manage the cache. I didn't include it in the actual image because caching could have the unwanted side effect that it will be still accessible after you deleted it
@dessalines commented on GitHub (Oct 20, 2019):
Unfortunately the reverse proxy can't do the caching, it needs to be done in the actual docker nginx config.
@dessalines commented on GitHub (Jan 4, 2020):
I'm still stuck on this, has anyone gotten pictshare caching to work?
@Nutomic commented on GitHub (Jun 3, 2020):
FYI you can do this with the following nginx config: