mirror of
https://github.com/dcarrillo/whatismyip.git
synced 2025-07-03 12:29:25 +00:00
Return 404 when the dns domain has any path different than /
This commit is contained in:
@ -31,7 +31,7 @@ func GetDNSDiscoveryHandler(store *cache.Cache, domain string, redirectPort stri
|
||||
return
|
||||
}
|
||||
|
||||
if ctx.Request.Host == domain {
|
||||
if ctx.Request.Host == domain && ctx.Request.URL.Path == "/" {
|
||||
ctx.Redirect(http.StatusFound, fmt.Sprintf("http://%s.%s%s", uuid.New().String(), domain, redirectPort))
|
||||
ctx.Abort()
|
||||
return
|
||||
|
Reference in New Issue
Block a user