- Server operating system version
- Ubuntu 20.04.6 LTS
- Plesk version and microupdate number
- Plesk Obsidian 18.0.51 Update #1
I have a website that "detects" browser language when is invoked directly and redirect accordingly to the proper language.
I have found out that if I "Enable nginx caching" it will cache this redirect. What happens is taht any following request from anyone/anywhere else, will be redirected to the "first" user language even if is different.
To debug I use:
curl -Ls -H 'Accept-Language: XX' -I https://www.website.tld
and I see x-cache-status: HIT except the first time.
I've tried adding some directives but none seems to works.
proxy_cache_valid 302 0;
proxy_no_cache $http_response_status 302;
proxy_cache_bypass $http_response_status 302;
Is there any way to avoid this caching behavior?
I have found out that if I "Enable nginx caching" it will cache this redirect. What happens is taht any following request from anyone/anywhere else, will be redirected to the "first" user language even if is different.
To debug I use:
curl -Ls -H 'Accept-Language: XX' -I https://www.website.tld
and I see x-cache-status: HIT except the first time.
I've tried adding some directives but none seems to works.
proxy_cache_valid 302 0;
proxy_no_cache $http_response_status 302;
proxy_cache_bypass $http_response_status 302;
Is there any way to avoid this caching behavior?