[PR #5655] Omit proxy_protocol from API response when false #26376

Open
opened 2026-08-05 07:07:15 -04:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/5655

State: closed
Merged: No


Summary

  • Only set opts.ProxyProtocol in the API response when the value is true
  • The internal Target model uses a plain bool, which was always being assigned to the *bool API field, causing "proxy_protocol": false to appear in every response even when not configured
  • This caused Terraform ImportStateVerify mismatches in the provider

Test plan

  • Verify existing reverse proxy service tests pass
  • Create a service without proxy_protocol, confirm the field is absent from the GET response
  • Create a service with proxy_protocol=true, confirm it appears in the response

Summary by CodeRabbit

  • Bug Fixes
    • Fixed API response to exclude ProxyProtocol when not applicable, reducing unnecessary response data.
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/5655 **State:** closed **Merged:** No --- ## Summary - Only set `opts.ProxyProtocol` in the API response when the value is `true` - The internal `Target` model uses a plain `bool`, which was always being assigned to the `*bool` API field, causing `"proxy_protocol": false` to appear in every response even when not configured - This caused Terraform ImportStateVerify mismatches in the provider ## Test plan - Verify existing reverse proxy service tests pass - Create a service without proxy_protocol, confirm the field is absent from the GET response - Create a service with proxy_protocol=true, confirm it appears in the response <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed API response to exclude ProxyProtocol when not applicable, reducing unnecessary response data. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
saavagebueno added the pull-request label 2026-08-05 07:07:15 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#26376