鏡像自
https://github.com/therootcompany/keypairs
synced 2025-12-15 09:48:40 +00:00
add String method to Whitelist
This commit is contained in:
父節點
3ab2594234
當前提交
c4fc285259
@ -451,3 +451,12 @@ func NewWhitelist(issuers []string, assumePrivate ...bool) (Whitelist, error) {
|
|||||||
func (w Whitelist) IsTrustedIssuer(iss string, rs ...*http.Request) bool {
|
func (w Whitelist) IsTrustedIssuer(iss string, rs ...*http.Request) bool {
|
||||||
return isTrustedIssuer(iss, w, rs...)
|
return isTrustedIssuer(iss, w, rs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// String will generate a space-delimited list of whitelisted URLs
|
||||||
|
func (w Whitelist) String() string {
|
||||||
|
s := []string{}
|
||||||
|
for i := range w {
|
||||||
|
s = append(s, w[i].String())
|
||||||
|
}
|
||||||
|
return strings.Join(s, " ")
|
||||||
|
}
|
||||||
|
|||||||
載入中…
x
新增問題並參考
Block a user