ITrustedDomainHelper
in
Allows checking domains and full URLs against the list of trusted domains for this server in the config file.
Tags
Table of Contents
Methods
- isTrustedDomain() : bool
- Checks whether a given domain is considered as trusted from the list of trusted domains in the server's config file. If no trusted domains have been configured, returns true.
- isTrustedUrl() : bool
- Checks whether a given URL is considered as trusted from the list of trusted domains in the server's config file. If no trusted domains have been configured and the url is valid, returns true.
Methods
isTrustedDomain()
Checks whether a given domain is considered as trusted from the list of trusted domains in the server's config file. If no trusted domains have been configured, returns true.
public
isTrustedDomain(string $domainWithPort) : bool
This is used to prevent Host Header Poisoning.
Parameters
- $domainWithPort : string
Tags
Return values
boolisTrustedUrl()
Checks whether a given URL is considered as trusted from the list of trusted domains in the server's config file. If no trusted domains have been configured and the url is valid, returns true.
public
isTrustedUrl(string $url) : bool
Parameters
- $url : string