How to curl with an active apt-cacher configuration

I have a working apt-cacher configuration. Now, I want to do a curl as root within a templateVM.

curl --proxy 127.0.0.1:8082 <URI> --output <dir/filename>

I get the following error message:

curl: (56) Received HTTP code 403 from proxy after CONNECT

The code 403 sound similar to:

Failed to fetch ....
Invalid response from proxy: HTTP/1.0 403 CONNECT denied (ask the admin to allow HTTPS tunnels)

Therefore, I guess the issue is related to the apt-cacher settings.

My 20-user-apt-cacher.policy is the following:

qubes.UpdatesProxy * @type:TemplateVM @default allow target=apt-cacher

What do I need to modify in my policy or curl command to by-pass the apt-cacher for this use case?

Did you change the uri to start with http://HTTPS/// ?

Yes, I tested both ways with https and with http://HTTPS///

Ah, yes, sorry the URI was ‘hidden’ in my script by a variable.
Thanks, for the hint I was just checking the apt-cacher settings before.

Let me do some further checks…