Is there a way to internally resolve 302 redirects?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a way to internally resolve 302 redirects?

Robin Dinse
Hello,

I am using a Squid cache with SSLBump to reduce the bandwidth impact of Chocolatey upgrades. The setup works fine, however some URLs randomly redirect to different CDNs which means the files are re-downloaded upon each request.

I would like Squid to instead resolve the redirects so as to not follow 302 redirects at all in subsequent queries, but to provide the first file that was encountered in following the redirect(s) the first time it encounters the query URL.

Best
- Ben

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to internally resolve 302 redirects?

Alex Rousskov
On 12/3/20 6:49 AM, Robin Dinse wrote:

> I am using a Squid cache with SSLBump to reduce the bandwidth impact of
> Chocolatey upgrades. The setup works fine, however some URLs randomly
> redirect to different CDNs which means the files are re-downloaded upon
> each request.
>
> I would like Squid to instead resolve the redirects so as to not follow
> 302 redirects at all in subsequent queries, but to provide the first
> file that was encountered in following the redirect(s) the first time it
> encounters the query URL.

I am not sure I am parsing your request correctly, but it sounds like
you may need to investigate two solutions:

1. Block or make unnecessary some cache validation requests (because
they result in unwanted redirects).

2. Computing your own Store IDs (so that Squid can answer the redirected
requests using the already stored responses):
https://wiki.squid-cache.org/Features/StoreID


HTH,

Alex.
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users