feat: Add ability to expose Swagger specification (#1577)
This commit is contained in:
@@ -64,6 +64,7 @@ module.exports.custom = {
|
||||
|
||||
showDetailedAuthErrors: process.env.SHOW_DETAILED_AUTH_ERRORS === 'true',
|
||||
outgoingProxy: process.env.OUTGOING_PROXY,
|
||||
swaggerExposed: process.env.SWAGGER_EXPOSED === 'true',
|
||||
|
||||
s3Endpoint: process.env.S3_ENDPOINT,
|
||||
s3Region: process.env.S3_REGION,
|
||||
|
||||
@@ -44,6 +44,7 @@ module.exports.policies = {
|
||||
|
||||
'_internal/update-config': ['is-authenticated', 'is-internal'],
|
||||
|
||||
'swagger/show': true,
|
||||
'bootstrap/show': true,
|
||||
'terms/show': true,
|
||||
'access-tokens/create': true,
|
||||
|
||||
@@ -235,6 +235,8 @@ module.exports.routes = {
|
||||
|
||||
'PATCH /api/_internal/config': '_internal/update-config',
|
||||
|
||||
'GET /swagger.json': 'swagger/show',
|
||||
|
||||
'GET /favicons/*': {
|
||||
fn: protectedStaticDirServer('/favicons', () => sails.config.custom.faviconsPathSegment),
|
||||
skipAssets: false,
|
||||
|
||||
Reference in New Issue
Block a user