onyx
onyx copied to clipboard
Fix: Correctly route /openapi.json and /api/* paths in Nginx config
Overview
This PR addresses the routing issue described in #1134, where accessing the /api/docs
endpoint failed to load the OpenAPI definition due to an incorrect path for fetching /openapi.json
. By updating the Nginx configuration, both the /api/*
and /openapi.json
paths are now correctly routed, ensuring the documentation UI functions as expected.
Changes
- Modified the Nginx configuration to match both
/api/*
and/openapi.json
with a single rule. - Added a rewrite rule for
/api
prefixed paths to correctly route API requests without affecting the/openapi.json
endpoint.
Impact
- Resolves the documentation UI issue by allowing
/api/docs
to successfully fetch the OpenAPI definition. - Simplifies the routing logic in the Nginx configuration, potentially reducing future maintenance efforts.
Testing
- Verified that the documentation UI at
/api/docs
correctly loads the OpenAPI schema. - Confirmed that API routes are unaffected by the new Nginx configuration rule.
Closes #1134
Someone is attempting to deploy a commit to the Danswer Team on Vercel.
A member of the Team first needs to authorize it.
Thanks a ton for this contribution!