fix(headers): MutableHeaders.pop() compatibility + dev environment setup#19
Draft
Bobcatsfan33 wants to merge 1 commit into
Draft
fix(headers): MutableHeaders.pop() compatibility + dev environment setup#19Bobcatsfan33 wants to merge 1 commit into
Bobcatsfan33 wants to merge 1 commit into
Conversation
…tern The starlette MutableHeaders class does not have a pop() method. Replace with a guard + del pattern that works across all starlette versions. Also add AGENTS.md with Cursor Cloud specific development instructions. Co-authored-by: Bobcatsfan33 <Bobcatsfan33@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MutableHeaders.pop()call inmodules/security/headers.pythat fails across all starlette versions (starlette'sMutableHeadershas never exposed apop()method). Replaced with a guard +delpattern.AGENTS.mdwith Cursor Cloud specific development instructions covering required services, environment caveats, and key commands.Type of Change
Security Review Checklist
Testing
Verified environment is fully functional:
ruff check .— all checks passedpytest tests/ -v— 155/155 tests passedDEV_MODE=true uvicorn api:app --reload— app starts successfullycurl http://localhost:8000/— health check returns{"service": "TokenDNA", "redis": true, "dev_mode": true}curl http://localhost:8000/secure— token integrity check works with synthetic dev-userdev_environment_test_output.log
Related Issues
N/A — discovered during development environment setup.
To show artifacts inline, enable in settings.