Skip to content

Commit 246a901

Browse files
authored
Merge pull request #24 from niiknow/bionic
update issue #19 and #21
2 parents e2dbf52 + 361f045 commit 246a901

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

files/etc/nginx/sites-enabled/server.conf

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ server {
2727
server_name _;
2828
root /usr/share/nginx/html;
2929
index index.html index.htm;
30-
error_page 403 = @403;
31-
error_page 404 = @404;
32-
error_page 415 = @415;
33-
error_page 500 = @500;
34-
error_page 502 503 504 = @empty;
30+
31+
# error should simply return as error so user can use image onerror handler
32+
# error_page 403 = @403;
33+
# error_page 404 = @404;
34+
# error_page 415 = @415;
35+
# error_page 500 = @500;
36+
# error_page 502 503 504 = @empty;
3537
error_page 301 302 307 = @handle_redirect;
3638

3739
# begin image_filter stuff
@@ -63,6 +65,8 @@ server {
6365
proxy_cache remoteimages;
6466
proxy_ssl_server_name on;
6567
proxy_intercept_errors on;
68+
proxy_cache_use_stale updating error timeout http_500 http_502 http_503 http_504;
69+
proxy_cache_background_update on;
6670

6771
# valid for "any" http status within 10 minutes
6872
proxy_cache_valid any 10m;

0 commit comments

Comments
 (0)