Coder Social home page Coder Social logo

Comments (6)

Turbo87 avatar Turbo87 commented on June 19, 2024 1

hmm, if I understand their docs correctly then strict should be as safe as the sandbox mode, but the sandbox mode would potentially enable a few more features. given all that, I guess strict should work fine for us.

from crates.io.

Turbo87 avatar Turbo87 commented on June 19, 2024

Refused to frame '' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'frame-src' was not explicitly set, so 'default-src' is used as a fallback.

I think this might be the relevant error in the dev tools.

To answer your questions: Yes, it is live in production. No, I personally hadn't tested it on production yet. Yes, it is broken... 😅

It looks like the reason why it works in development mode but not production is (yet again) our Content Security Policy header, which is set by nginx, which is not running in frontend development mode 🙈

@ToBinio do you have time to take a look at this? first step would be to try and reproduce this locally, and then find a CSP header that allows the mermaid stuff to render correctly.

from crates.io.

ToBinio avatar ToBinio commented on June 19, 2024

Shure, I can try.
But I will only be able to do something in the evening.

another note:
could it be that because the rendered README's get stored. the old ones like natural-xml-diff don't get mermaid support?
if so, these should probaly get rerendered

from crates.io.

Urhengulas avatar Urhengulas commented on June 19, 2024

@Turbo87 @ToBinio Thank you for the quick response. Please let me know if I can support you in any way.

from crates.io.

ToBinio avatar ToBinio commented on June 19, 2024

I discovered a new problem... mermaid did not work on my local machine even without the CSP header. Why? firefox...
not sure why but I wasn't able to get the sandbox mode running with Firefox (with Chrome everything was fine)

so I didn't really play around with the CSP header any longer.

a fix for both would be to use strict mode instead of sandbox. this worked with the CSP header and on Firefox

note:
sandbox is still in beta

from crates.io.

Urhengulas avatar Urhengulas commented on June 19, 2024

Thank you for fixing it! It does render now!

from crates.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.