Skip to content

Commit

Permalink
Block webrtc
Browse files Browse the repository at this point in the history
...when using ALLOW_LEGACY_RELAXED_CSP=false

Note that this doesn't actually work yet, because the browsers don't
implement this feature, but I've at least gotten it into the standards.
I will probably have to do the implementation work myself too.

But we may as well go ahead and add this to Sandstorm without waiting
for the browsers.

See also: sandstormports/community-project#12
  • Loading branch information
zenhack committed Jul 31, 2022
1 parent bf47ef3 commit 9b9c9ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/sandstorm/web-session-bridge.c++
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,7 @@ kj::Promise<void> WebSessionBridge::handleResponse(
tables.hContentSecurityPolicy,
kj::str(
"default-src 'none'; "
"webrtc 'block'; "
#define UNSAFE "'unsafe-inline' 'unsafe-eval' data: blob:; "
"img-src * " UNSAFE
"media-src * " UNSAFE
Expand Down

0 comments on commit 9b9c9ed

Please sign in to comment.