1
0
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:
Ivar Conradi Østhus 2020-11-24 22:03:12 +01:00
parent c77f85f60f
commit af4bea4cb8
3 changed files with 6 additions and 0 deletions

View File

@ -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);
}

View File

@ -59,6 +59,7 @@ function defaultOptions() {
headersTimeout: 61 * 1000,
version,
secureHeaders: process.env.SECURE_HEADERS || false,
enableOAS: process.env.ENABLE_OAS || false,
};
}

View File

@ -12,4 +12,5 @@ unleash.start({
ssl: false,
},
enableRequestLogger: true,
enableOAS: true,
});