read x-mesh-secret header correctly

This commit is contained in:
Laura Klünder 2023-12-09 20:24:15 +01:00
parent 2c395462b0
commit a8fda62d24

View file

@ -59,7 +59,7 @@ class MeshConsumer(AsyncWebsocketConsumer):
async def connect(self):
self.headers = dict(self.scope["headers"])
if not constant_time_compare(self.headers[b"X-Mesh-Secret"].strip(),
if not constant_time_compare(self.headers[b"x-mesh-secret"].strip(),
settings.SECRET_MESH_KEY.encode()):
raise DenyConnection