Exclude /api from PROXY forward auth (#790)

* Update middleware.py

* Fix gulp

* Call super()

* Fix comment formatting

* Super duper

---------

Co-authored-by: Christopher Charbonneau Wells <10456740+cdubz@users.noreply.github.com>
This commit is contained in:
zjean 2024-04-13 17:19:17 +02:00 committed by GitHub
parent aa1e2c68de
commit 2c10fc03a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -91,6 +91,12 @@ class CustomRemoteUser(RemoteUserMiddleware):
header = getenv("PROXY_HEADER", "HTTP_REMOTE_USER")
def process_request(self, request):
# Exclude API paths using token authentication.
if request.path.startswith("api/"):
return None
return super().process_request(request)
class HomeAssistant:
"""