Core: add /autopilot-manager/ location to nginx#3778
Core: add /autopilot-manager/ location to nginx#3778Williangalvani wants to merge 1 commit intobluerobotics:masterfrom
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideExpose a new /autopilot-manager/ endpoint through nginx that forwards to the core service with CORS enabled, mirroring the existing pattern used by other service locations. Sequence diagram for /autopilot-manager/ request through nginxsequenceDiagram
actor Client
participant Nginx
participant Core_service
Client->>Nginx: HTTP request GET /autopilot-manager/
Nginx->>Nginx: Match location /autopilot-manager/
Nginx->>Nginx: Apply CORS from cors.conf
Nginx->>Core_service: Proxy request to http://127.0.0.1:8000/
Core_service-->>Nginx: HTTP response
Nginx-->>Client: HTTP response with CORS headers
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on March 15
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| location /autopilot-manager/ { | ||
| include cors.conf; | ||
| proxy_pass http://127.0.0.1:8000/; | ||
| } |
There was a problem hiding this comment.
Proxy pass strips manager prefix
Medium Severity
location /autopilot-manager/ uses proxy_pass http://127.0.0.1:8000/;, which rewrites the upstream URI by stripping the /autopilot-manager/ prefix. If the core service routes are mounted under /autopilot-manager/, requests will unexpectedly hit / on the upstream and can return 404 or wrong content.
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider whether
/autopilot-manager(without trailing slash) should also be handled; if so, add a matchinglocation = /autopilot-manageror similar to avoid redirect or 404 inconsistencies. - Since
/autopilot-manager/is proxied to the same backend as the root location, confirm whether any additional CORS or auth behavior is intended here or if this should instead be handled via a shared/include block to avoid configuration drift.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider whether `/autopilot-manager` (without trailing slash) should also be handled; if so, add a matching `location = /autopilot-manager` or similar to avoid redirect or 404 inconsistencies.
- Since `/autopilot-manager/` is proxied to the same backend as the root location, confirm whether any additional CORS or auth behavior is intended here or if this should instead be handled via a shared/include block to avoid configuration drift.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.


needs testingtestedSummary by Sourcery
New Features:
Note
Low Risk
Small nginx config change that only adds an additional proxy location; main risk is misrouting or unintended exposure of the upstream service.
Overview
Adds a new nginx route
location /autopilot-manager/that mirrors the existing/ardupilot-manager/behavior by enabling CORS and proxying requests to the core service on127.0.0.1:8000.Written by Cursor Bugbot for commit 6090655. This will update automatically on new commits. Configure here.
Summary by Sourcery
New Features: