fix: restrict web server CORS defaults#1
Open
rtmalikian wants to merge 1 commit into
Open
Conversation
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
README.md,web_server/README.md, and the FastAPI web server implementation.web_server/README.md: streaming response support, multi-model support, enhanced UI features, performance optimizations, additional language support, and documentation improvements. These were broad/ambiguous for a safe one-change daily run, so I did not implement them.CORS_ALLOW_ORIGINSas a comma-separated opt-in for deployments that need additional trusted browser origins.Security probing
web_server/app.py.python3 -m pip_auditcould not run becausepip_auditis not installed in this environment.Verification
python3 -m pytest tests/test_web_server_cors.py -qfailed before the fix because CORS allowed["*"].python3 -m pytest tests/test_web_server_cors.py -qpassed after the fix.python3 -m py_compile web_server/app.pypassed.git diff --checkpassed.Files changed
web_server/app.pytests/test_web_server_cors.pyREADME.mdweb_server/README.mdLimitations
CHANGELOG.mdexists, so no changelog entry was added.