Nextcloud PHP API (stable18)

EmptyFeaturePolicy

Class EmptyFeaturePolicy is a simple helper which allows applications to modify the FeaturePolicy sent by Nextcloud. Per default the policy is forbidding everything.

As alternative with sane exemptions look at FeaturePolicy

Tags
see
FeaturePolicy
since
17.0.0

Table of Contents

$autoplayDomains  : string[]
$cameraDomains  : string[]
$fullscreenDomains  : string[]
$geolocationDomains  : string[]
$microphoneDomains  : string[]
$paymentDomains  : string[]
addAllowedAutoplayDomain()  : $this
Allows to use autoplay from a specific domain. Use * to allow from all domains.
addAllowedCameraDomain()  : $this
Allows to use the camera on a specific domain. Use * to allow from all domains
addAllowedFullScreenDomain()  : $this
Allows the full screen functionality to be used on a specific domain. Use * to allow from all domains
addAllowedGeoLocationDomain()  : $this
Allows to use the geolocation on a specific domain. Use * to allow from all domains
addAllowedMicrophoneDomain()  : $this
Allows to use the microphone on a specific domain. Use * to allow from all domains
addAllowedPaymentDomain()  : $this
Allows to use the payment API on a specific domain. Use * to allow from all domains
buildPolicy()  : string
Get the generated Feature-Policy as a string

Properties

Methods

addAllowedAutoplayDomain()

Allows to use autoplay from a specific domain. Use * to allow from all domains.

public addAllowedAutoplayDomain(string $domain) : $this
Parameters
$domain : string

Domain to whitelist. Any passed value needs to be properly sanitized.

Tags
since
17.0.0
Return values
$this

addAllowedCameraDomain()

Allows to use the camera on a specific domain. Use * to allow from all domains

public addAllowedCameraDomain(string $domain) : $this
Parameters
$domain : string

Domain to whitelist. Any passed value needs to be properly sanitized.

Tags
since
17.0.0
Return values
$this

addAllowedFullScreenDomain()

Allows the full screen functionality to be used on a specific domain. Use * to allow from all domains

public addAllowedFullScreenDomain(string $domain) : $this
Parameters
$domain : string

Domain to whitelist. Any passed value needs to be properly sanitized.

Tags
since
17.0.0
Return values
$this

addAllowedGeoLocationDomain()

Allows to use the geolocation on a specific domain. Use * to allow from all domains

public addAllowedGeoLocationDomain(string $domain) : $this
Parameters
$domain : string

Domain to whitelist. Any passed value needs to be properly sanitized.

Tags
since
17.0.0
Return values
$this

addAllowedMicrophoneDomain()

Allows to use the microphone on a specific domain. Use * to allow from all domains

public addAllowedMicrophoneDomain(string $domain) : $this
Parameters
$domain : string

Domain to whitelist. Any passed value needs to be properly sanitized.

Tags
since
17.0.0
Return values
$this

addAllowedPaymentDomain()

Allows to use the payment API on a specific domain. Use * to allow from all domains

public addAllowedPaymentDomain(string $domain) : $this
Parameters
$domain : string

Domain to whitelist. Any passed value needs to be properly sanitized.

Tags
since
17.0.0
Return values
$this

buildPolicy()

Get the generated Feature-Policy as a string

public buildPolicy() : string
Tags
since
17.0.0
Return values
string

Search results