From c8e67e31586f7e046e75505519780328aa9cfc96 Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 9 Aug 2023 19:32:49 -0500 Subject: [PATCH] Add proxy for fastapi swager ui docs --- next.config.js | 14 ++++++++++++++ requirements.txt | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/next.config.js b/next.config.js index e084ef9..e6b49bc 100644 --- a/next.config.js +++ b/next.config.js @@ -9,6 +9,20 @@ const nextConfig = { ? "http://127.0.0.1:8000/api/:path*" : "/api/", }, + { + source: "/docs", + destination: + process.env.NODE_ENV === "development" + ? "http://127.0.0.1:8000/docs" + : "/api/docs", + }, + { + source: "/openapi.json", + destination: + process.env.NODE_ENV === "development" + ? "http://127.0.0.1:8000/openapi.json" + : "/api/openapi.json", + }, ]; }, }; diff --git a/requirements.txt b/requirements.txt index 9f35711..1428c53 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -fastapi==0.95.2 -uvicorn[standard] \ No newline at end of file +fastapi==0.100.1 +uvicorn[standard]==0.23.2 \ No newline at end of file