Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions workspaces/orchestrator/.changeset/purple-eagles-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@red-hat-developer-hub/backstage-plugin-orchestrator-backend': patch
---

fix: add configurable bodyParser limit
2 changes: 2 additions & 0 deletions workspaces/orchestrator/app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ catalog:
dynamicPlugins:
frontend: {}
orchestrator:
# Uncomment to set the content length limit for the requests. Defaults to 102400 bytes (100kb)
# contentLengthLimit: 10mb
# Uncomment and configure to use the log viewer
# workflowLogProvider:
# loki:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,12 @@ export async function createBackendRouter(
const permissionsIntegrationRouter = createPermissionIntegrationRouter({
permissions: orchestratorPermissions,
});
router.use(express.json());
const contentLengthLimit = config.getOptionalString(
'orchestrator.contentLengthLimit',
);
router.use(express.json({ limit: contentLengthLimit }));
router.use(permissionsIntegrationRouter);
router.use('/workflows', express.text());
router.use('/workflows', express.text({ limit: contentLengthLimit }));
router.get('/health', (_, response) => {
logger.info('PONG!');
response.json({ status: 'ok' });
Expand Down
Loading