mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-17 23:03:49 +01:00
fix(route): allow excluded routes to use localhost addresses
Routes marked for exclusion should bypass normal validation checks, including the restriction on localhost/127.0.0.1 hostnames.
This commit is contained in:
@@ -254,7 +254,7 @@ func (r *Route) validate() gperr.Error {
|
||||
}
|
||||
|
||||
// return error if route is localhost:<godoxy_port> but route is not agent
|
||||
if !r.IsAgent() {
|
||||
if !r.IsAgent() && !r.ShouldExclude() {
|
||||
switch r.Host {
|
||||
case "localhost", "127.0.0.1":
|
||||
switch r.Port.Proxy {
|
||||
|
||||
Reference in New Issue
Block a user