diff --git a/docs/example.nginx.conf b/docs/example.nginx.conf index ea1c45516..60f476b47 100644 --- a/docs/example.nginx.conf +++ b/docs/example.nginx.conf @@ -161,6 +161,11 @@ server { # We've applied other sandboxing techniques to mitigate the risk of running WebAssembly in this privileged scope if ($uri ~ ^\/unsafeiframe\/inner\.html.*$) { set $unsafe 1; } + # draw.io uses inline script tags in it's index.html. The hashes are added here. + if ($uri ~ ^\/bower_components\/drawio\/src\/main\/webapp\/index.html.*$) { + set $scriptSrc "'self' 'sha256-6zAB96lsBZREqf0sT44BhH1T69sm7HrN34rpMOcWbNo=' 'sha256-6g514VrT/cZFZltSaKxIVNFF46+MFaTSDTPB8WfYK+c=' resource: https://${main_domain}"; + } + # privileged contexts allow a few more rights than unprivileged contexts, though limits are still applied if ($unsafe) { set $scriptSrc "'self' 'unsafe-eval' 'unsafe-inline' resource: https://${main_domain}";