-
Hello, I have use case question for the Download Mode File (https://docs.gomods.io/configuration/download/). We'd like to exclude everything, then whitelist only certain modules. Is this possible? If it is possible, another side effect is how to add this to the use cases in the documentation? Thank you, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
hey @damnski ! it is possible, here's a simple example of a Download Mode File: downloadURL = "https://proxy.golang.org"
mode = "sync"
download "company.com/allow/a" {
mode = "sync"
}
download "company.com/allow/b" {
mode = "sync"
}
download "company.com/allow/*" {
mode = "none"
} In the download mode file above, only However, do note that even downloads are restricted, the |
Beta Was this translation helpful? Give feedback.
hey @damnski ! it is possible, here's a simple example of a Download Mode File:
In the download mode file above, only
company.com/allow/a
andcompany.com/allow/b
will be whitelisted.However, do note that even downloads are restricted, the
/list
and/latest
handlers will still return data to the proxy user. I'm not sure if this is intended but just a note here.Reference: #1826, #1774