(address string)
| 43 | } |
| 44 | |
| 45 | func (al *allowList) Allows(address string) bool { |
| 46 | if al.All { |
| 47 | return true |
| 48 | } |
| 49 | if !strings.HasSuffix(address, "/") { |
| 50 | address = address + "/" |
| 51 | } |
| 52 | for _, uri := range al.URIs { |
| 53 | if strings.HasPrefix(address, uri) { |
| 54 | return true |
| 55 | } |
| 56 | } |
| 57 | return false |
| 58 | } |
| 59 | |
| 60 | func parseAllowlistString(allowlistStr string) (allowList, error) { |
| 61 | switch allowlistStr { |
no outgoing calls