Skip to content

middleware cleaning #2024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jerryfletcher21
Copy link
Contributor

@jerryfletcher21 jerryfletcher21 commented Jun 26, 2025

What does this PR do?

This PR removes some old code from middleware.py.
Since #1985 was merged, it removes the legacy support for splitting HTTP_AUTHORIZATION in 3 instead of 4.
It removes support for sending authorization with cookies that really old clients pre federation were using.
I am pretty sure nobody is running such an old client that still sends cookies, but with #1985 merged these will no longer work since they were not sending the nostr pubkey.

Checklist before merging

  • Install pre-commit and initialize it: pip install pre-commit, then pre-commit install. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.

allow HTTP_AUTHORIZATION to be split just in 4
remove support for sending authorization with cookies
@jerryfletcher21 jerryfletcher21 changed the title remove support for sending authorization with cookies middleware cleaning Jun 27, 2025
Copy link
Member

@KoalaSat KoalaSat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR will be controversial. There are many 3rd party programs consuming Robosats API. We need to announce this with 2 versions in advance and make sure everyone is able to continue their trade after the updagre. On going orders might loose their access to the chat if they don´t have access to peer PGP. My plan is first to fully migrate the chat to nostr.

@jerryfletcher21
Copy link
Contributor Author

@KoalaSat with #1985 merged, the old clients that did not send the nostr pubkey can no longer create robots. This PR simply cleans up old code from clients that did not send the nostr pubkey. Since #1985 was merged, it should not be controversial I think.

@jerryfletcher21
Copy link
Contributor Author

@KoalaSat I can help with the transition of the chat to nostr in the backend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants