Nextcloud PHP API (master)

ITrustedDomainHelper

Allows checking domains and full URLs against the list of trusted domains for this server in the config file.

Tags
since
23.0.0

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
since
23.0.0
Return values
bool

isTrustedUrl()

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
Tags
since
23.0.0
Return values
bool

        
On this page

Search results