Skip to content

fix: Adds webhook size limit parameter#42

Merged
f-nie merged 13 commits intomainfrom
fix/webhook-size-limit
Nov 10, 2025
Merged

fix: Adds webhook size limit parameter#42
f-nie merged 13 commits intomainfrom
fix/webhook-size-limit

Conversation

@f-nie
Copy link
Contributor

@f-nie f-nie commented Oct 28, 2025

Fixes #40

@f-nie f-nie requested a review from David-Kunz October 28, 2025 15:36
cds-plugin.js Outdated
cds.app.post(webhookBasePath, _validateCertificate.bind(this))
}
cds.app.post(webhookBasePath, express.json())
const limit = this.options.webhookSizeLimit ?? "1mb"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use the body parser limit and a dedicated option for webhooks only, like

body_parser_limit ?? webook_body_parser_limit

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be in favor of webhook_body_parser_limit ?? body_parser_limit 😄

Since we would like to have an increased body size limit only for this event hub endpoint.

f-nie and others added 3 commits October 30, 2025 16:33
Copy link
Contributor

@David-Kunz David-Kunz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny correction, otherwise okay!

f-nie and others added 3 commits November 10, 2025 09:19
Co-authored-by: Dr. David A. Kunz <david.kunz@sap.com>
"requires": {
"messaging": {
"kind": "event-broker",
"webhookSizeLimit": "1mb"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also name it body_parser: { limit: ... } for consistency?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose this name because it's more obvious what the parameter is used for in our case.

@f-nie f-nie merged commit bc59433 into main Nov 10, 2025
9 checks passed
@f-nie f-nie deleted the fix/webhook-size-limit branch November 10, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

App can't receive events larger than 100kb

3 participants