mirror of
https://github.com/langchain-ai/langserve.git
synced 2026-07-18 10:54:29 -04:00
FastAPI Root Path Option is Ignored #130
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sbachstein on GitHub (Feb 27, 2024).
When deploying behind a reverse proxy, you often rewrite/truncate the HTTP paths and remove some API URL prefix. In order to compensate for that, FastAPI offers the
root_pathoption. That way, things like the/docsendpoint for the Swagger UI still work.Langserve, however, does not take the
root_pathinto account and, thus, the Langserve Playground does not work correctly. That's because any additional requests (CSS/JS) point to the wrong URL (missing the root path prefix).@nat-n commented on GitHub (Feb 27, 2024):
workin' on a fix here :) #472
@sbachstein commented on GitHub (Feb 27, 2024):
Awesome, thank you for working on it!
@eyurtsev commented on GitHub (Feb 28, 2024):
Merged and will be released in a few
@eyurtsev commented on GitHub (Feb 28, 2024):
Thank you @nat-n