-
Notifications
You must be signed in to change notification settings - Fork 0
Support HEAD method for health checks and allow localhost in staging #75
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,6 +96,8 @@ class StagingConfig(BaseConfig): | |
| ALLOWED_HOSTS: List[str] = [ | ||
| "taimako.onrender.com", | ||
| "taimakoai.onrender.com", | ||
| "localhost", | ||
| "127.0.0.1", | ||
| ] | ||
|
Comment on lines
96
to
101
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Security Vulnerability: Host Header Injection in Staging EnvironmentAllowing Recommendation: ALLOWED_HOSTS: List[str] = [
"taimako.onrender.com",
"taimakoai.onrender.com",
] |
||
|
|
||
| class ProductionConfig(BaseConfig): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,10 +91,10 @@ | |
| app.include_router(orders_router) | ||
|
|
||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Changing |
||
| @app.get("/") | ||
| @app.api_route("/", methods=["GET", "HEAD"]) | ||
| async def root(): | ||
| return success_response(message="Agentic RAG API is running") | ||
|
|
||
| @app.get("/health") | ||
| @app.api_route("/health", methods=["GET", "HEAD"]) | ||
| async def health_check(): | ||
| return {"status": "healthy"} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 Adding
localhostand127.0.0.1toALLOWED_HOSTSin theStagingConfigis a good practice for local development and enabling health checks from local network tools.