Skip to content

Conversation

@lbriceno-tz
Copy link
Contributor

📋 Overview

Provide a clear summary of the purpose and scope of this pull request:

  • What problem does this pull request address?
    Change regex validation to enable using hostnames with subdomain wildcard

  • What features or functionality does this pull request introduce or enhance?
    Using a wildcard subdomain (e.g. *.google.com) is not allowed to be used in the hostname input.

🔄 Changes

🛠️ Type of change

  • 🐛 Bugfix (a non-breaking change that resolves an issue)
  • ✨ New feature (a non-breaking change that adds new functionality)
  • ⚠️ Breaking change (a fix or feature that alters existing functionality in a way that could cause issues)
  • 🎨 User Interface (UI) updates
  • 📄 New Documentation (addition of new documentation)
  • 📄 Documentation Update (modification of existing documentation)
  • 📄 Documentation Update Required (the change requires updates to related documentation)
  • 🔧 Other (please specify):
    • Provide additional details here.

📄 Checklist *

  • 🔍 My code adheres to the style guidelines of this project.
  • ✅ I ran ESLint and other code linters for modified files.
  • 🛠️ I have reviewed and tested my code.
  • 📝 I have commented my code, especially in hard-to-understand areas (e.g., using JSDoc for methods).
  • ⚠️ My changes generate no new warnings.
  • 🤖 My code needed automated testing. I have added them (this is an optional task).
  • 📄 Documentation updates are included (if applicable).
  • 🔒 I have considered potential security impacts and mitigated risks.
  • 🧰 Dependency updates are listed and explained.
  • 📚 I have read and understood the Pull Request guidelines.

📷 Screenshots or Visual Changes

Example of monitor hostname not allowed
image

Copy link
Collaborator

@CommanderStorm CommanderStorm left a comment

Choose a reason for hiding this comment

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

Monitoring *.tum.sexy make sense for DNS, but don't for the other monitors I think.

What does for example HTTP *.google.de mean?
According to curl, this is an invalid URL.

=> I think we need to limit this to dns, or is there another of the usage of hostNameRegexPattern

@CommanderStorm CommanderStorm changed the title fix(Hostname): allow hostname with wildcard subdomain feat: allow hostname with wildcard subdomain Apr 17, 2025
@CommanderStorm CommanderStorm added feature-request Request for new features to be added A:monitor Issues or PRs related to monitors pr:please address review comments this PR needs a bit more work to be mergable labels Apr 17, 2025
@louislam
Copy link
Owner

Actually good question. Also, DNS' hostname should not accept IP addresses, but the current regex accepts it.

I am thinking maybe we can migrate it to validator for DNS type.
validator.isFQDN() with allow_wildcard: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A:monitor Issues or PRs related to monitors feature-request Request for new features to be added pr:please address review comments this PR needs a bit more work to be mergable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants