athens icon indicating copy to clipboard operation
athens copied to clipboard

Download Mode leaks

Open pboguslawski opened this issue 2 years ago • 1 comments

Problem

One wants to block any requests from Athens proxy to given hostname (say myhost.mydomain) using download mode file as described on

https://gomods.io/configuration/download/

With download mode files

downloadURL = "https://proxy.golang.org"

mode = "sync"

download "myhost.mydomain" {
    mode = "none"
}

Athens blocks (as expected with none) requests for given module version i.e.

http-path=/myhost.mydomain/foo/foo1/@v/v1.0.2.zip

but searching for latest version with

http-path=/myhost.mydomain/foo/@v/list

is not blocked using download mode file like above and Athens tries to dial https://myhost.mydomain/?go-get=1

Shouldn't Athens block such requests without dialing when pattern with none matches hostname?

Athens Version

0.11.0

pboguslawski avatar May 30 '22 18:05 pboguslawski

I see similar behavior on the /@latest endpoint too

ngshiheng avatar Feb 16 '23 11:02 ngshiheng