Skip to content

Conversation

@PVerstappen
Copy link

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
}

$allowedIpsResult = '';
if($allowedIps !== '*' && !empty($allowedIps)) {
Copy link
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)


/* Convert the domain names to IP addresses */
if($allowedDomains !== '*' && !empty($allowedDomains)) {
$allowedDomainsArray = explode(',', $allowedDomains);
Copy link
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

}

/* Return concatenated IPs and domains IPs */
return trim($allowedIpsResult, ' ,');
Copy link
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