claude overtook and fixes
This commit is contained in:
+6
-1
@@ -610,7 +610,12 @@ app.get("/openapi.json", (_req, res) => {
|
||||
|
||||
addResourceEndpoints();
|
||||
|
||||
app.use("/docs", swaggerUi.serveFiles(undefined, swaggerOptions("")), swaggerUi.setup(undefined, swaggerOptions("")));
|
||||
// Behind the AppFactory reverse proxy the container is reached via /apps/<app-id> and
|
||||
// the prefix is stripped (handle_path) before requests arrive here. The Swagger UI page is
|
||||
// therefore served at the public /apps/<app-id>/docs, so the OpenAPI document URL and the
|
||||
// "Try it out" base path must carry ROOT_PATH; otherwise the browser would resolve them
|
||||
// against the bare origin and bypass the app.
|
||||
app.use("/docs", swaggerUi.serveFiles(undefined, swaggerOptions(rootPath)), swaggerUi.setup(undefined, swaggerOptions(rootPath)));
|
||||
|
||||
if (rootPath) {
|
||||
app.get(rootPath, (_req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user