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
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
$autoplayDomains
protected
string[]
$autoplayDomains
= null
$cameraDomains
protected
string[]
$cameraDomains
= null
$fullscreenDomains
protected
string[]
$fullscreenDomains
= null
$geolocationDomains
protected
string[]
$geolocationDomains
= null
$microphoneDomains
protected
string[]
$microphoneDomains
= null
$paymentDomains
protected
string[]
$paymentDomains
= null
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
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
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
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
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
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
Return values
$this —buildPolicy()
Get the generated Feature-Policy as a string
public
buildPolicy() : string