Skip to content

Enable swagger behind proxy#301

Merged
fjugipe merged 5 commits intomainfrom
issue-290_proxy-host-middleware
Mar 26, 2026
Merged

Enable swagger behind proxy#301
fjugipe merged 5 commits intomainfrom
issue-290_proxy-host-middleware

Conversation

@fjugipe
Copy link
Contributor

@fjugipe fjugipe commented Mar 10, 2026

Description

After this pull request:

  • Swagger documentation is directed to the correct path and is able to get the openapi.json
  • Using the API queries via Swagger execute will be correctly directed to the proxys url

Features

  • Add x-forwarded-headers middleware to handle the requests with known proxies
  • Add UvicornWorkerWithForwardedHeaders uvicorn worker to disable default proxy header handling with gunicorn
    • gunicorn does not have --proxy-headers option in startup like uvicorn does
      --proxy-headers / --no-proxy-headers
                                    Enable/Disable X-Forwarded-Proto,
                                    X-Forwarded-For, X-Forwarded-Port to
                                    populate remote address info.
    

closes #290

@github-actions
Copy link

github-actions bot commented Mar 10, 2026

Title Coverage Tests Skipped Failures Errors Time
API Unit Tests Coverage 47 0 💤 0 ❌ 0 🔥 1.641s ⏱️
Ingest Unit Tests Coverage 16 0 💤 0 ❌ 0 🔥 2.484s ⏱️

Copy link
Collaborator

@Teddy-1000 Teddy-1000 left a comment

Choose a reason for hiding this comment

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

LGTM

@fjugipe fjugipe merged commit 866673e into main Mar 26, 2026
6 checks passed
@fjugipe fjugipe deleted the issue-290_proxy-host-middleware branch March 26, 2026 11:48
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.

[API] Openapi documentation in multiple proxy situations

3 participants