Using host IP instead of dns name #425
-
Hi all and thank you for sharing. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
At first sight, this seems to be the point to be considered func getHost(r *nethttp.Request) (string, error) {
// check the host header first, then the request host
// field (which may contain the actual URL if there is no
// host header)
if r.Header.Get("Host") != "" {
return r.Header.Get("Host"), nil
}
if r.Host != "" {
return r.Host, nil
}
return "", fmt.Errorf("host not found")
} I have to verify if it already contains the ip in case it was sent from the client (and if the add-on is already usable to filter by ip as it is now, in such a situation). I'm already looking at
and this suggesting instead Well, I see in the interceptor's code comment itself that it reads:
so I would guess there is no code change needed, though this fact was not apparent from the README. Will test it soon... |
Beta Was this translation helpful? Give feedback.
At first sight, this seems to be the point to be considered
I have to verify if it already contains the ip in case it was sent from the client (and if the add-on is already usable to filter by ip as it is now, in such a situation).
I'm already looking at
this
answers saying