Compare commits
1 Commits
7bee78a875
...
d3502e5f9b
| Author | SHA1 | Date | |
|---|---|---|---|
| d3502e5f9b |
@ -430,6 +430,23 @@ func whitelistKey(email string) string {
|
|||||||
|
|
||||||
return email
|
return email
|
||||||
}
|
}
|
||||||
|
func isPrivateIP(ip net.IP) bool {
|
||||||
|
if ip[0] == 10 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
if ip[0] == 172 {
|
||||||
|
if ip[1] >= 16 && ip[1] < 32 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if ip[0] == 192 && ip[1] == 168 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
func (mg *Maingate) RegisterHandlers(ctx context.Context, serveMux *http.ServeMux, prefix string) error {
|
func (mg *Maingate) RegisterHandlers(ctx context.Context, serveMux *http.ServeMux, prefix string) error {
|
||||||
var allServices []*serviceDescription
|
var allServices []*serviceDescription
|
||||||
|
|||||||
Reference in New Issue
Block a user