Skip to content

Comments

Core: add /autopilot-manager/ location to nginx#3778

Open
Williangalvani wants to merge 1 commit intobluerobotics:masterfrom
Williangalvani:nginx-autopilot-location
Open

Core: add /autopilot-manager/ location to nginx#3778
Williangalvani wants to merge 1 commit intobluerobotics:masterfrom
Williangalvani:nginx-autopilot-location

Conversation

@Williangalvani
Copy link
Member

@Williangalvani Williangalvani commented Feb 9, 2026

needs testing tested

Summary by Sourcery

New Features:

  • Expose /autopilot-manager/ path via nginx, forwarding requests to the core service with CORS enabled.

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 on 127.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:

  • Expose a new /autopilot-manager/ HTTP endpoint through nginx, forwarding requests to the core backend with CORS support.

@sourcery-ai
Copy link

sourcery-ai bot commented Feb 9, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Expose 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 nginx

sequenceDiagram
    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
Loading

File-Level Changes

Change Details Files
Add nginx location block to route /autopilot-manager/ to the core service with CORS enabled.
  • Introduce a new location /autopilot-manager/ block in the main server configuration.
  • Include the shared CORS configuration within the new location block.
  • Configure the new location to proxy requests to the core service at http://127.0.0.1:8000/.
core/tools/nginx/nginx.conf

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@Williangalvani Williangalvani marked this pull request as ready for review February 23, 2026 15:08
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

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/;
}
Copy link

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • 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.
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.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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