From bd26e4e9c1b146163ee839de0a45bb9354efd1f2 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 9 Jun 2020 17:17:24 -0400 Subject: Fixing some front end pictshare to pictrs conversions. --- ansible/templates/docker-compose.yml | 2 +- ansible/templates/nginx.conf | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'ansible/templates') diff --git a/ansible/templates/docker-compose.yml b/ansible/templates/docker-compose.yml index 0b33399b..f4c94fd7 100644 --- a/ansible/templates/docker-compose.yml +++ b/ansible/templates/docker-compose.yml @@ -37,7 +37,7 @@ services: iframely: image: dogbin/iframely:latest ports: - - "127.0.0.1:8538:80" + - "127.0.0.1:8061:80" volumes: - ./iframely.config.local.js:/iframely/config.local.js:ro restart: always diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf index b96bbce7..68fa64fc 100644 --- a/ansible/templates/nginx.conf +++ b/ansible/templates/nginx.conf @@ -75,10 +75,14 @@ server { proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + if ($request_uri ~ \.(?:ico|gif|jpe?g|png|webp|bmp|mp4)$) { + add_header Cache-Control "public, max-age=31536000, immutable"; + } } location /iframely/ { - proxy_pass http://0.0.0.0:8538/; + proxy_pass http://0.0.0.0:8061/; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -- cgit v1.2.3