mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-27 11:02:16 +01:00
fix: add OAS to server hosting
This commit is contained in:
parent
c77f85f60f
commit
af4bea4cb8
@ -43,6 +43,10 @@ module.exports = function(config) {
|
||||
app.use(baseUriPath, express.static(config.publicFolder));
|
||||
}
|
||||
|
||||
if (config.enableOAS) {
|
||||
app.use(`${baseUriPath}/oas`, express.static('docs/api/oas'));
|
||||
}
|
||||
|
||||
if (config.adminAuthentication === 'unsecure') {
|
||||
simpleAuthentication(baseUriPath, app);
|
||||
}
|
||||
|
||||
@ -59,6 +59,7 @@ function defaultOptions() {
|
||||
headersTimeout: 61 * 1000,
|
||||
version,
|
||||
secureHeaders: process.env.SECURE_HEADERS || false,
|
||||
enableOAS: process.env.ENABLE_OAS || false,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -12,4 +12,5 @@ unleash.start({
|
||||
ssl: false,
|
||||
},
|
||||
enableRequestLogger: true,
|
||||
enableOAS: true,
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user