lemmy/docker
Nick Webster a57658d99c
Adding a new config flag to disable pictrs caching for thumbnails (#3897)
* add logic to prevent downloading remote pictrs images

* apply formatting

* Do not attempt a pictrs fetch if the remote image is also on a pictrs instance

* Do not attempt a pictrs fetch if the remote image is also on a pictrs instance and cache_federated_images is false

* Generalising the no caching option to handle all remote images

* rustfmt

* Return None if the URL is not an image

* Updating defaults.hjson

* fixing typo

* Fixing typo

* Skip cloning the Url unless we need to

* using a HEAD request for checking the content type, saving bandwidth/improving perf

* Removing early returns

* Switching back to GET requests for Content-Type because pictrs does not handle HEAD requests

* Simplifying logic and using metadata_image instead of url if we do not get a pictrs thumbnail

* Removing unused import

* Return None as a thumbnail if caching is disabled

* formatting

---------

Co-authored-by: Djones4822 <david.jones4822@gmail.com>
2023-08-31 10:36:39 -04:00
..
federation Version 0.18.1 2023-07-07 09:24:49 -04:00
docker_db_backup.sh make shebangs posix compliant (#2974) 2023-06-08 15:38:26 -04:00
docker_update.sh Add workaround for #3102 until cross-compile work complete (#3472) 2023-07-13 13:02:08 +02:00
docker-compose.yml Add workaround for #3102 until cross-compile work complete (#3472) 2023-07-13 13:02:08 +02:00
Dockerfile Add ARM64 Docker image support (#3810) 2023-08-31 09:02:59 -04:00
lemmy.hjson Adding a new config flag to disable pictrs caching for thumbnails (#3897) 2023-08-31 10:36:39 -04:00
nginx.conf Combine prod and dev docker setups using build-arg (#2739) 2023-02-17 15:29:45 +09:00
test_deploy.sh Adding current domain from settings to CORs. (#3231) 2023-06-20 20:29:48 -04:00