Skip to content

Download Mode File - Exclude Everything, Then Whitelist #1788

Answered by ngshiheng
damnski asked this question in Q&A
Discussion options

You must be logged in to vote

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 company.com/allow/a and company.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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by matt0x6F
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants