Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a href="https://discord.gg/VTngQTaeDf"><img src="https://img.shields.io/badge/Discord-Join%20Lumen%20Brain-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Discord"/></a>
<img src="https://img.shields.io/badge/version-2.11.11--dev-blue?style=for-the-badge" alt="Version"/>
<img src="https://img.shields.io/badge/version-2.11.12--dev-blue?style=for-the-badge" alt="Version"/>
<img src="https://img.shields.io/badge/python-3.11+-green?style=for-the-badge&logo=python&logoColor=white" alt="Python"/>
<img src="https://img.shields.io/badge/license-AGPLv3%20%2B%20Commons%20Clause-purple?style=for-the-badge" alt="License"/>
</p>
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "brainapi2"
version = "2.11.11-dev"
version = "2.11.12-dev"
description = "Version 2.x.x of the BrainAPI memory layer."
authors = [
{name = "Christian",email = "alch.infoemail@gmail.com"}
Expand Down
8 changes: 8 additions & 0 deletions src/services/mcp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ async def __call__(self, scope, receive, send):
bearer = None
if raw.startswith("Bearer: "):
bearer = raw.removeprefix("Bearer: ").strip() or None
if bearer:
raw_headers = [
(name, value)
for name, value in raw_headers
if name.lower() != b"authorization"
]
raw_headers.append((b"authorization", f"Bearer {bearer}".encode()))
scope = {**scope, "headers": raw_headers}
elif raw.startswith("Bearer "):
bearer = raw.removeprefix("Bearer ").strip() or None
if bearer:
Expand Down