Fix key checking
This commit is contained in:
		| @@ -60,6 +60,7 @@ async def view_doorboy_uids(request): | |||||||
| @app.route("/longpoll", stream=True) | @app.route("/longpoll", stream=True) | ||||||
| async def view_longpoll(request): | async def view_longpoll(request): | ||||||
|     response = await request.respond(content_type="text/event-stream") |     response = await request.respond(content_type="text/event-stream") | ||||||
|  |     key = request.headers.get("KEY") | ||||||
|     if not key or key not in [DOORBOY_SECRET_FLOOR, DOORBOY_SECRET_WORKSHOP]: |     if not key or key not in [DOORBOY_SECRET_FLOOR, DOORBOY_SECRET_WORKSHOP]: | ||||||
|         return text("Invalid token") |         return text("Invalid token") | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user