Skip to content

feat(http): make CORS request headers configurable - #473

Open
GabrielFeliciano-ONCWKR wants to merge 1 commit into
redpanda-data:mainfrom
GabrielFeliciano-ONCWKR:feat/configurable-cors-headers
Open

feat(http): make CORS request headers configurable#473
GabrielFeliciano-ONCWKR wants to merge 1 commit into
redpanda-data:mainfrom
GabrielFeliciano-ONCWKR:feat/configurable-cors-headers

Conversation

@GabrielFeliciano-ONCWKR

Copy link
Copy Markdown

Problem

Browser JSON requests send Content-Type in Access-Control-Request-Headers. Benthos rejected this header during preflight, returning 403.

Fix

Adds configurable CORS request headers through cors.allowed_headers.

  • Supports explicit allowed headers.
  • Supports * for all requested headers.
  • Applies to native and WASM implementations.
  • Prevents deployments from requiring proxy-specific CORS workarounds.

Testing

go test ./internal/httpserver ./internal/impl/io

@CLAassistant

CLAassistant commented Aug 11, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

2 participants