Skip to content

Commit

Permalink
added cache for sunbirdigot read
Browse files Browse the repository at this point in the history
  • Loading branch information
Haritest authored Sep 5, 2022
1 parent 2b393f1 commit 57db33f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions kubernetes/helm_charts/core/nginx-public-ingress/values.j2
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,34 @@ proxyconfig: |-
proxy_pass http://ui-proxies:3003;
}

# This is Caching mechanism for r search
location ~ /apis/proxies/v8/sunbirdigot/read {
# Enabling caching
proxy_cache_key "$request_uri|$request_body";
proxy_cache content_cache;
add_header X-Proxy-Cache $upstream_cache_status;
add_header X-Proxy-Cache-Date $upstream_http_date;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_cache_methods POST;
proxy_cache_revalidate on;
proxy_cache_background_update on;
proxy_cache_lock on;
proxy_cache_valid 200 14400s;
# Increasing the proxy buffer size
proxy_buffer_size 16k;
proxy_busy_buffers_size 16k;
rewrite ^/apis/(.*) /$1 break;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }};
proxy_connect_timeout 5;
proxy_send_timeout 60;
proxy_read_timeout 70;
proxy_http_version 1.1;
proxy_pass http://ui-proxies:3003;
}

location /protected/v8/resource/ {
if ($request_method = OPTIONS ) {
add_header Access-Control-Allow-Origin "*" ;
Expand Down

0 comments on commit 57db33f

Please sign in to comment.