scottie1984 / swagger-ui-express

Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your app.
MIT License
1.41k stars 225 forks source link

Path redirect #296

Closed vorticalbox closed 2 years ago

vorticalbox commented 2 years ago
const express = require('express');
const app = express();
const swaggerUi = require('swagger-ui-express');
const swaggerDocument = require('./swagger.json');

app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument));

when put behind a reverse proxy under /demo E.g http://localhost:8080/demo/api-docs redirects to http://localhost:8080/api-docs

scottie1984 commented 2 years ago

I can point you to a few similar issues:

https://github.com/scottie1984/swagger-ui-express/issues/237 https://github.com/scottie1984/swagger-ui-express/issues/210 https://github.com/scottie1984/swagger-ui-express/issues/111

scottie1984 commented 2 years ago

N