Add proxy for fastapi swager ui docs
This commit is contained in:
parent
688a711d50
commit
c8e67e3158
2 changed files with 16 additions and 2 deletions
|
|
@ -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",
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
fastapi==0.95.2
|
||||
uvicorn[standard]
|
||||
fastapi==0.100.1
|
||||
uvicorn[standard]==0.23.2
|
||||
Loading…
Add table
Add a link
Reference in a new issue