Skip to content

EDM-2984: UI includes Flightctl-API-Version header (#465)#467

Merged
celdrake merged 1 commit intoflightctl:release-1.1from
celdrake:EDM-2984-include-flightctl-api-version
Feb 3, 2026
Merged

EDM-2984: UI includes Flightctl-API-Version header (#465)#467
celdrake merged 1 commit intoflightctl:release-1.1from
celdrake:EDM-2984-include-flightctl-api-version

Conversation

@celdrake
Copy link
Collaborator

@celdrake celdrake commented Feb 3, 2026

  • EDM-2984: Allow Flightctl-API-Version header

(cherry picked from commit 1a7373b)

Summary by CodeRabbit

  • Infrastructure & Improvements
    • Added API version header support to HTTP requests across the application to enhance API compatibility and enable improved version management.
    • Updated cross-origin resource sharing (CORS) configuration to support API version headers.

* EDM-2984: Allow Flightctl-API-Version header

(cherry picked from commit 1a7373b)
@celdrake celdrake changed the base branch from main to release-1.1 February 3, 2026 10:06
@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

Walkthrough

The changes introduce optional API version header support to HTTP request helpers. The addRequiredHeaders function is extended to accept an optional API version parameter, which is conditionally set to Flightctl-API-Version when provided. CRUD-like helpers are refactored to derive API context and pass the version header when targeting the flightctl API, while CORS configuration is updated to allow this header.

Changes

Cohort / File(s) Summary
OCP Plugin API Helpers
apps/ocp-plugin/src/utils/apiCalls.ts
Extended addRequiredHeaders to accept optional apiVersion parameter; refactored HTTP helpers (putOrPostData, deleteData, patchData, fetchData) to derive API context via getFullApiUrl(kind) and conditionally pass API_VERSION when API is flightctl. Import added for API_VERSION constant.
Standalone API Helpers
apps/standalone/src/app/utils/apiCalls.ts
Updated fetchWithRetry to conditionally add Flightctl-API-Version header using API_VERSION constant when targeting the flightctl API.
Proxy CORS Configuration
proxy/app.go
Added Flightctl-API-Version to the list of allowed CORS headers in corsHandler.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding the Flightctl-API-Version header to UI requests, which aligns with all file modifications (OCP plugin, standalone app, and proxy CORS configuration).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Failure to add the new IP will result in interrupted reviews.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@celdrake celdrake merged commit 9fb30c8 into flightctl:release-1.1 Feb 3, 2026
6 checks passed
@celdrake celdrake deleted the EDM-2984-include-flightctl-api-version branch February 3, 2026 10:13
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