Skip to content

Add h1-case-adjust-bogus-server option - #225

Open
kenichi-mashiyama wants to merge 1 commit into
six-group:mainfrom
kenichi-mashiyama:add-h1-case-adjust-bogus-server-option
Open

Add h1-case-adjust-bogus-server option#225
kenichi-mashiyama wants to merge 1 commit into
six-group:mainfrom
kenichi-mashiyama:add-h1-case-adjust-bogus-server-option

Conversation

@kenichi-mashiyama

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for the option h1-case-adjust-bogus-server directive in the defaults section of the HAProxy configuration.

Motivation

Currently, there is no way to configure h1-case-adjust-bogus-server in the defaults section through the HAProxy Operator CRDs. This option is necessary for environments dealing with legacy or non-compliant backend servers that require strict HTTP/1.1 header casing (e.g., expecting Content-Type instead of content-type). By adding this boolean field, users can now easily enable this feature globally via the DefaultsConfiguration.

Changes

  • Added the H1CaseAdjustBogusServer boolean field to the DefaultsConfiguration struct in apis/proxy/v1alpha1/instance_types.go.
  • Updated the Model() method for the defaults configuration to map this new field to the native HAProxy model (models.DefaultsBaseH1CaseAdjustBogusServerEnabled).
  • Added unit tests in apis/proxy/v1alpha1/instance_types_test.go to verify the correct generation of the option h1-case-adjust-bogus-server directive when enabled, and its absence when disabled.
  • Regenerated CRDs and API documentation to reflect the schema updates.

Checklist

  • Code changes implemented
  • Unit tests added/updated
  • Generated CRDs and API docs updated

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.

1 participant