Skip to content

Commit

Permalink
nginx: Drop proxy cache
Browse files Browse the repository at this point in the history
  • Loading branch information
barthalion committed Oct 18, 2024
1 parent 1eb19fb commit 4d07039
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,7 @@ http {
text/x-cross-domain-policy;

proxy_buffering on;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_cache_revalidate on;
proxy_hide_header Strict-Transport-Security;
proxy_cache_background_update on;

proxy_cache_path /var/cache/nginx/ keys_zone=cache:5m
levels=1:2 max_size=2g inactive=2h use_temp_path=off;

server {
listen 8080;
Expand Down Expand Up @@ -117,7 +111,6 @@ http {
}

location /api/v1/ {
proxy_cache cache;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
Expand All @@ -132,21 +125,15 @@ http {
}

location = /api/v1/apps/collection/new/feed {
proxy_cache cache;
proxy_cache_valid 200 1h;
proxy_pass http://backend:8000/feed/new;
}

location = /api/v1/apps/collection/recently-updated/feed {
proxy_cache cache;
proxy_cache_valid 200 1h;
proxy_pass http://backend:8000/feed/recently-updated;
}

rewrite ^/stats$ /stats/;
location /stats/ {
proxy_cache cache;
proxy_cache_valid 200 1h;
proxy_pass https://hub.flathub.org/stats/stable/;
}

Expand Down

0 comments on commit 4d07039

Please sign in to comment.