Skip to content

Directive: webrtc

Ryan Parman edited this page Jun 14, 2024 · 7 revisions

Overview

The webrtc directive restricts whether connections may be established via WebRTC.

No local ICE candidates will be surfaced, as no STUN checks will be made against the ICE server provided to the peer connection negotiated below; No connectivity-checks will be attempted to any remote candidates provided by JS; The connectionState will never transition to "connected" and instead transition directly from its initial state of "new" to "failed" shortly.

Usage examples

It supports a value of 'allow' or 'block'.

webrtc 'allow'

Fallbacks

webrtc does not fallback to default-src.

Possible errors

  • CSP-0600 — [ERROR] directive %s has an invalid value %s
  • CSP-0601 — [ERROR] directive webrtc may only have a single value

For developers

ABNF (CSP3)

directive-name  = "webrtc"
directive-value = "'allow'" / "'block'"

References

Clone this wiki locally