feat: Add ability to expose Swagger specification (#1577)

This commit is contained in:
Hannes
2026-03-11 11:39:42 +01:00
committed by GitHub
parent 7604a31a74
commit bb907d62e4
8 changed files with 48 additions and 0 deletions
+1
View File
@@ -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,
+1
View File
@@ -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,
+2
View File
@@ -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,