chore: disable GET response caching and Cache-Control header in proxy_request handler
This commit is contained in:
parent
8adaffe9f3
commit
6956a757f2
6
proxy.py
6
proxy.py
@ -72,9 +72,9 @@ async def proxy_request(request, method, max_retries=10, retry_delay=2):
|
||||
status=resp.status,
|
||||
content_type=resp.content_type
|
||||
)
|
||||
if method == 'GET':
|
||||
api_cache[api_url] = (data, resp.status, resp.content_type)
|
||||
response.headers['Cache-Control'] = f'public, max-age={API_CACHE_MAX_AGE}'
|
||||
#if method == 'GET':
|
||||
#api_cache[api_url] = (data, resp.status, resp.content_type)
|
||||
#response.headers['Cache-Control'] = f'public, max-age={API_CACHE_MAX_AGE}'
|
||||
return add_cors_headers(response)
|
||||
except Exception:
|
||||
if attempt < max_retries - 1:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user