diff --git a/authentik/lib/sentry.py b/authentik/lib/sentry.py index 3d69a7b2d..a0bd4eeec 100644 --- a/authentik/lib/sentry.py +++ b/authentik/lib/sentry.py @@ -110,6 +110,7 @@ def before_send(event: dict, hint: dict) -> Optional[dict]: "django.security.DisallowedHost", "django_redis.cache", "celery.backends.redis", + "celery.worker", ]: return None LOGGER.debug("sending event to sentry", exc=exc_value, source_logger=event.get("logger", None)) diff --git a/internal/outpost/proxyv2/application/application.go b/internal/outpost/proxyv2/application/application.go index 1c7604769..7ff9f207d 100644 --- a/internal/outpost/proxyv2/application/application.go +++ b/internal/outpost/proxyv2/application/application.go @@ -178,22 +178,6 @@ func NewApplication(p api.ProxyOutpostConfig, c *http.Client, cs *ak.CryptoStore return a, nil } -func (a *Application) IsAllowlisted(r *http.Request) bool { - for _, u := range a.UnauthenticatedRegex { - var testString string - if a.Mode() == api.PROXYMODE_PROXY || a.Mode() == api.PROXYMODE_FORWARD_SINGLE { - testString = r.URL.Path - } else { - testString = r.URL.String() - } - a.log.WithField("regex", u.String()).WithField("url", testString).Trace("Matching URL against allow list") - if u.MatchString(testString) { - return true - } - } - return false -} - func (a *Application) Mode() api.ProxyMode { return *a.proxyConfig.Mode } diff --git a/internal/outpost/proxyv2/application/mode_common.go b/internal/outpost/proxyv2/application/mode_common.go index a1430ad1e..fbd0c6943 100644 --- a/internal/outpost/proxyv2/application/mode_common.go +++ b/internal/outpost/proxyv2/application/mode_common.go @@ -6,6 +6,7 @@ import ( "net/http" "strings" + "goauthentik.io/api" "goauthentik.io/internal/constants" ) @@ -62,3 +63,19 @@ func (a *Application) addHeaders(headers http.Header, c *Claims) { } } } + +func (a *Application) IsAllowlisted(r *http.Request) bool { + for _, u := range a.UnauthenticatedRegex { + var testString string + if a.Mode() == api.PROXYMODE_PROXY || a.Mode() == api.PROXYMODE_FORWARD_SINGLE { + testString = r.URL.Path + } else { + testString = r.URL.String() + } + a.log.WithField("regex", u.String()).WithField("url", testString).Trace("Matching URL against allow list") + if u.MatchString(testString) { + return true + } + } + return false +}