You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're running into an issue where the Location header sent in a 302 request is getting changed depending on if the response is a cache MISS or HIT. On misses, a relative URL is returned (as desired). On hits, an absolute URL is returned despite a relative URL being saved to the cache.
The srcache configuration:
srcache_response_cache_control on;
srcache_default_expire 0s;
set $key $scheme$host$request_uri$bb_accept$requested_with$cookie__bb_locale$cookie__bb_country;
set_escape_uri $escaped_key $key;
srcache_fetch GET /redis $key;
srcache_store PUT /redis2 key=$escaped_key&exptime=$srcache_expire;
When submitting a request that returns 302 response that is a cache MISS, the Location header is relative.
I've tried using proxy_redirect off; in the nginx configuration, but it doesn't seem to have an affect on the responses coming from srcache.
If I use srcache_store_statuses 200; to explicitly not cache redirect pages, responses include relative Location headers and aren't cached. This is less desirable in our environment, but is a temporary workaround.
Can you confirm that srcache rewriting the Location header being returned in cached responses? Is there an option for disabling the behavior we're experiencing?
Thank you.
The text was updated successfully, but these errors were encountered:
…module overwrite the Location response header's values like "/foo/bar" to the fully-qualified form (like "http://test.com/foo/bar"). thanks AlexClineBB for the report in #32.
We're running into an issue where the Location header sent in a 302 request is getting changed depending on if the response is a cache MISS or HIT. On misses, a relative URL is returned (as desired). On hits, an absolute URL is returned despite a relative URL being saved to the cache.
The srcache configuration:
When submitting a request that returns 302 response that is a cache MISS, the Location header is relative.
We can see that the response is now cached in our redis instance:
Subsequent requests that generate a cache HIT are returned with a FQDN in the Location header rather than the relative path:
I've tried using
proxy_redirect off;
in the nginx configuration, but it doesn't seem to have an affect on the responses coming from srcache.If I use
srcache_store_statuses 200;
to explicitly not cache redirect pages, responses include relative Location headers and aren't cached. This is less desirable in our environment, but is a temporary workaround.Can you confirm that srcache rewriting the Location header being returned in cached responses? Is there an option for disabling the behavior we're experiencing?
Thank you.
The text was updated successfully, but these errors were encountered: