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",
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue