Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Middleware to Handle Duplicate Slashes in URLs (microsoft#51)
This PR adds some FastAPI middleware to fix URLs that have duplicate forward slashes. For example, if the user puts the following in their .env file.... ```dotenv TEST_OPENAI_ENDPOINT=http://localhost:8000/ ``` ... then the tests will generate urls such as `http://localhost:8000//openai/foo/bar/baz`. Notice the double forward slash. This causes the simulator to generate errors. This is an easy config mistake to make, so this middleware helps address this problem by removing these duplicates.
- Loading branch information