Skip to content

[FEATURE] Allow a list of domains - #64

Open
PVerstappen wants to merge 6 commits into
georgringer:masterfrom
PVerstappen:master
Open

[FEATURE] Allow a list of domains#64
PVerstappen wants to merge 6 commits into
georgringer:masterfrom
PVerstappen:master

Conversation

@PVerstappen

Copy link
Copy Markdown

This feature implements allowedDomains next to allowedIps, retrieves IPs from the DNS and merges it automatically with the allowedIps list.

@PVerstappen PVerstappen changed the title [FEATURE] Allow a list of allowedDomains [FEATURE] Allow a list of domains Jun 25, 2021
Comment thread Classes/Client.php
}

$allowedIpsResult = '';
if($allowedIps !== '*' && !empty($allowedIps)) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please apply PSR coding standards to all files. (space after if)

Comment thread Classes/Client.php

/* Convert the domain names to IP addresses */
if($allowedDomains !== '*' && !empty($allowedDomains)) {
$allowedDomainsArray = explode(',', $allowedDomains);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

use GeneralUtility::trimExplode instead

Comment thread Classes/Client.php
}

/* Return concatenated IPs and domains IPs */
return trim($allowedIpsResult, ' ,');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

collect the resulting IPs in an array first and do the implode here-

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.

4 participants