Skip to content

Allow adding and checking vhosts with path#53

Open
dweissengruber wants to merge 2 commits intomaelstrom-cms:masterfrom
dweissengruber:support_url_with_path
Open

Allow adding and checking vhosts with path#53
dweissengruber wants to merge 2 commits intomaelstrom-cms:masterfrom
dweissengruber:support_url_with_path

Conversation

@dweissengruber
Copy link
Contributor

Support for adding Domains / Vhosts like "https://example.com/health" while keeping the functionality of Robots and DNS check intact.

To reduce load on checked systems and support for checking sub-dir setups.

{
$parts = parse_url($value);

$this->attributes['url'] = sprintf('%s://%s', $parts['scheme'], $parts['host']);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi, I'm not sure about this one - The rest of the application "relies" on the data being normalised before it gets to the database.

Removing this normalisation means that other areas would receive unexpected input e.g.

If the user enters https://google.com/ then certain areas might generate inaccurate urls e.g. https://google.com//favicon.ico

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see your point.
Would you prefer to add a normalized_hostname property (just like the dns_hostname) that can be used in cases where a normalized hostname is required, and using the original user-input for open-graph/uptime/crawler checks?

But when testing i didn´t encounter any issues with wrongly generated urls. Only the robots check had issues, but that is taken care of in this change.

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