Merge branch 'master' of https://github.com/micro/go-micro into namespace
This commit is contained in:
commit
cb96949551
@ -69,8 +69,8 @@ func (h authHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||||||
// Check the accounts namespace matches the namespace we're operating
|
// Check the accounts namespace matches the namespace we're operating
|
||||||
// within. If not forbid the request and log the occurance.
|
// within. If not forbid the request and log the occurance.
|
||||||
if acc.Namespace != namespace {
|
if acc.Namespace != namespace {
|
||||||
logger.Warnf("Cross namespace request forbidden: account %v (%v) requested access to %v in the %v namespace", acc.ID, acc.Namespace, req.URL.Path, namespace)
|
logger.Debugf("Cross namespace request warning: account %v (%v) requested access to %v in the %v namespace", acc.ID, acc.Namespace, req.URL.Path, namespace)
|
||||||
http.Error(w, "Forbidden namespace", 403)
|
// http.Error(w, "Forbidden namespace", 403)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine the name of the service being requested
|
// Determine the name of the service being requested
|
||||||
|
Loading…
Reference in New Issue
Block a user