Jitsi-meet: Content-Security-Policy needs 'unsave-inline'

Created on 1 Mar 2018  路  9Comments  路  Source: jitsi/jitsi-meet

jitsi-meet does not work, when CSP is set in webserver config file.
It is necessary to allow _unsave-inline_ otherwise it will not start.
This option leads to a less good testresult, for example try this: https://securityheaders.io/

Please fix it.

By the way:
Your own test result at
https://securityheaders.io/?q=https%3A%2F%2Fmeet.jit.si%2F&followRedirects=on
looks pretty bad. Maybe you want to set some header options?

web

Most helpful comment

I would like to see this issue reopened. I had to disable my webserver's default restrictive Content-Security-Policy to allow Jitsi Meet to work.

At least the recommended server configuration (https://github.com/jitsi/jitsi-meet/blob/master/doc/debian/jitsi-meet/jitsi-meet.example-apache) should include a value for this header (it does indeed need unsafe-inline to work - at least).

That is the easy part, removing the need for this exception could come in a second time.

Thanks

All 9 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I would like to see this issue reopened. I had to disable my webserver's default restrictive Content-Security-Policy to allow Jitsi Meet to work.

At least the recommended server configuration (https://github.com/jitsi/jitsi-meet/blob/master/doc/debian/jitsi-meet/jitsi-meet.example-apache) should include a value for this header (it does indeed need unsafe-inline to work - at least).

That is the easy part, removing the need for this exception could come in a second time.

Thanks

Providing the right CSP headers with the install and mentioned in the docs would be very nice indeed, as well as a fix for unsafe-inline.

ping @damencho as you seem to be maintaining the apache example file

A PR is welcome as I don't have much experience with apache ... Thanks.

I have added these headers and that works for us. We use NGINX and not Apache.

server {
...
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Content-Security_Policy "default-src 'self'; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https://www.google-analytics.com; script-src 'self' 'unsafe-inline' https://www.google-analytics.com/analytics.js https://www.googletagmanager.com/gtag/js https://unpkg.com; style-src 'self' 'unsafe-inline'; object-src 'none'";
...
}

For Apache the code needs to go in httpd.conf:

<IfModule mod_headers.c>
  <Directory />
    Header always set X-XSS-Protection "1; mode=block"
    Header always set x-Frame-Options "SAMEORIGIN"
    Header always set X-Content-Type-Options "nosniff"
    Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
    Header always set Content-Security-Policy "default-src 'self'; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https://www.google-analytics.com; script-src 'self' 'unsafe-inline' https://www.google-analytics.com/analytics.js https://www.googletagmanager.com/gtag/js https://unpkg.com; style-src 'self' 'unsafe-inline'; object-src 'none';"
    Header always set Referrer-Policy "strict-origin"
  </Directory>
</IfModule>

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

/unstale

I think @echristiaans' configuration is correct, will try to test it when time allows

@damencho can you reopen? I still have this on my radar

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kinnla picture kinnla  路  40Comments

rscastil picture rscastil  路  44Comments

jans23 picture jans23  路  130Comments

adammarketing picture adammarketing  路  90Comments

kangzhe0000 picture kangzhe0000  路  39Comments