Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Allow a list of domains #64

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

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