Skip to content

Allow disabling the host validation via env var#1637

Merged
maor-rozenfeld merged 1 commit intomainfrom
allow-internal-hosts
Nov 19, 2025
Merged

Allow disabling the host validation via env var#1637
maor-rozenfeld merged 1 commit intomainfrom
allow-internal-hosts

Conversation

@maor-rozenfeld
Copy link
Copy Markdown
Contributor

Resolves OPS-3078.

Copilot AI review requested due to automatic review settings November 19, 2025 11:03
@linear
Copy link
Copy Markdown

linear Bot commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds the ability to disable host validation through an environment variable (ENABLE_HOST_VALIDATION). The change allows operators to bypass internal address checks when needed, likely for specific deployment scenarios or testing environments.

Key Changes:

  • Added ENABLE_HOST_VALIDATION system property with a default value of true
  • Modified validateHost function to check the environment variable before performing validation
  • Added test coverage for the new disable functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/server/shared/src/lib/system/system-prop.ts Defines the new ENABLE_HOST_VALIDATION enum value
packages/server/shared/src/lib/system/system.ts Sets the default value for host validation to true
packages/server/shared/src/lib/host-validation/index.ts Implements the conditional validation logic based on the environment variable
packages/server/shared/test/host-validation/index.test.ts Adds test cases for disabled validation and empty host scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link
Copy Markdown

@maor-rozenfeld maor-rozenfeld merged commit 6cee49c into main Nov 19, 2025
22 checks passed
@maor-rozenfeld maor-rozenfeld deleted the allow-internal-hosts branch November 19, 2025 11:41
sg-doc-holiday Bot added a commit that referenced this pull request Nov 19, 2025
Create a root CHANGELOG.md and add the 0.6.7 entry following the style guide: emoji category headers, concise bullets, and a compare link. Entries are grounded by commits #1636, #1637, #1600, #1622, #1635, and #1577.
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.

3 participants