mirror of
https://github.com/openziti/zrok.git
synced 2025-01-03 12:39:07 +01:00
more camelCase
This commit is contained in:
parent
028ef8518b
commit
c9c4ca6c49
@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/openziti-test-kitchen/zrok/endpoints"
|
"github.com/openziti-test-kitchen/zrok/endpoints"
|
||||||
"github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/notfound_ui"
|
"github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/notFoundUi"
|
||||||
"github.com/openziti-test-kitchen/zrok/model"
|
"github.com/openziti-test-kitchen/zrok/model"
|
||||||
"github.com/openziti-test-kitchen/zrok/util"
|
"github.com/openziti-test-kitchen/zrok/util"
|
||||||
"github.com/openziti-test-kitchen/zrok/zrokdir"
|
"github.com/openziti-test-kitchen/zrok/zrokdir"
|
||||||
@ -83,7 +83,7 @@ func newServiceProxy(cfg *Config, ctx ziti.Context) (*httputil.ReverseProxy, err
|
|||||||
}
|
}
|
||||||
proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) {
|
proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) {
|
||||||
logrus.Errorf("error proxying: %v", err)
|
logrus.Errorf("error proxying: %v", err)
|
||||||
notfound_ui.WriteNotFound(w)
|
notFoundUi.WriteNotFound(w)
|
||||||
}
|
}
|
||||||
return proxy, nil
|
return proxy, nil
|
||||||
}
|
}
|
||||||
@ -183,15 +183,15 @@ func authHandler(svcToken string, handler http.Handler, realm string, cfg *Confi
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logrus.Warnf("%v -> no auth scheme for '%v'", r.RemoteAddr, svcToken)
|
logrus.Warnf("%v -> no auth scheme for '%v'", r.RemoteAddr, svcToken)
|
||||||
notfound_ui.WriteNotFound(w)
|
notFoundUi.WriteNotFound(w)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logrus.Warnf("%v -> no proxy config for '%v'", r.RemoteAddr, svcToken)
|
logrus.Warnf("%v -> no proxy config for '%v'", r.RemoteAddr, svcToken)
|
||||||
notfound_ui.WriteNotFound(w)
|
notFoundUi.WriteNotFound(w)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logrus.Warnf("%v -> service '%v' not found", r.RemoteAddr, svcToken)
|
logrus.Warnf("%v -> service '%v' not found", r.RemoteAddr, svcToken)
|
||||||
notfound_ui.WriteNotFound(w)
|
notFoundUi.WriteNotFound(w)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package health_ui
|
package healthUi
|
||||||
|
|
||||||
import "embed"
|
import "embed"
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package health_ui
|
package healthUi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/openziti-test-kitchen/zrok/endpoints"
|
"github.com/openziti-test-kitchen/zrok/endpoints"
|
||||||
"github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/health_ui"
|
"github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/healthUi"
|
||||||
"github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/notfound_ui"
|
"github.com/openziti-test-kitchen/zrok/endpoints/publicFrontend/notFoundUi"
|
||||||
"github.com/openziti-test-kitchen/zrok/model"
|
"github.com/openziti-test-kitchen/zrok/model"
|
||||||
"github.com/openziti-test-kitchen/zrok/util"
|
"github.com/openziti-test-kitchen/zrok/util"
|
||||||
"github.com/openziti-test-kitchen/zrok/zrokdir"
|
"github.com/openziti-test-kitchen/zrok/zrokdir"
|
||||||
@ -93,7 +93,7 @@ func newServiceProxy(cfg *Config, ctx ziti.Context) (*httputil.ReverseProxy, err
|
|||||||
}
|
}
|
||||||
proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) {
|
proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) {
|
||||||
logrus.Errorf("error proxying: %v", err)
|
logrus.Errorf("error proxying: %v", err)
|
||||||
notfound_ui.WriteNotFound(w)
|
notFoundUi.WriteNotFound(w)
|
||||||
}
|
}
|
||||||
return proxy, nil
|
return proxy, nil
|
||||||
}
|
}
|
||||||
@ -195,19 +195,19 @@ func authHandler(handler http.Handler, realm string, cfg *Config, ctx ziti.Conte
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logrus.Warnf("%v -> no auth scheme for '%v'", r.RemoteAddr, svcToken)
|
logrus.Warnf("%v -> no auth scheme for '%v'", r.RemoteAddr, svcToken)
|
||||||
notfound_ui.WriteNotFound(w)
|
notFoundUi.WriteNotFound(w)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logrus.Warnf("%v -> no proxy config for '%v'", r.RemoteAddr, svcToken)
|
logrus.Warnf("%v -> no proxy config for '%v'", r.RemoteAddr, svcToken)
|
||||||
notfound_ui.WriteNotFound(w)
|
notFoundUi.WriteNotFound(w)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logrus.Warnf("%v -> service '%v' not found", r.RemoteAddr, svcToken)
|
logrus.Warnf("%v -> service '%v' not found", r.RemoteAddr, svcToken)
|
||||||
notfound_ui.WriteNotFound(w)
|
notFoundUi.WriteNotFound(w)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logrus.Debugf("host '%v' did not match host match, returning health check", r.Host)
|
logrus.Debugf("host '%v' did not match host match, returning health check", r.Host)
|
||||||
health_ui.WriteHealthOk(w)
|
healthUi.WriteHealthOk(w)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package notfound_ui
|
package notFoundUi
|
||||||
|
|
||||||
import "embed"
|
import "embed"
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package notfound_ui
|
package notFoundUi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
Loading…
Reference in New Issue
Block a user