Skip to content
Merged
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
5 changes: 5 additions & 0 deletions workspaces/orchestrator/.changeset/strong-pillows-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@red-hat-developer-hub/backstage-plugin-orchestrator-common': patch
---

chore: add new config value for contentLengthLimit
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
Comment thread
lholmquist marked this conversation as resolved.
# Uncomment and configure to use the log viewer
# workflowLogProvider:
# loki:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,18 @@ export async function createBackendRouter(
const permissionsIntegrationRouter = createPermissionIntegrationRouter({
permissions: orchestratorPermissions,
});
router.use(express.json());
const contentLengthLimit = config.getOptionalString(
'orchestrator.contentLengthLimit',
);
/**
* Set the content length limit for the requests.
* Defaults to 102400 bytes (100kb)
*
* There is a possiblity that some workflows will have a very large payload, which could cause a 413 error.
* Increasing this value will allow larger payloads to be processed.
*
*/
router.use(express.json({ limit: contentLengthLimit }));
Comment thread
PatAKnight marked this conversation as resolved.
router.use(permissionsIntegrationRouter);
router.use('/workflows', express.text());
router.get('/health', (_, response) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export interface Config {
* Configuration for the Orchestrator plugin.
*/
orchestrator?: {
/**
* Set the content length limit for the requests.
* Defaults to 102400 bytes (100kb)
*/
contentLengthLimit?: string;
sonataFlowService: {
/**
* Base URL of the Sonata Flow service.
Expand Down
Loading