Git Product home page Git Product logo

Comments (6)

skube avatar skube commented on August 15, 2024 3

I added the secure prop and it works. Thanks!

<Video 
   secure
   ...

from cloudinary-react.

eitanp461 avatar eitanp461 commented on August 15, 2024 2

@skube this weird, since the protocol for serving images from Cloudinary relies on the window.location.protocol, see https://github.com/cloudinary/cloudinary_js/blob/a50f25d3bb308c98549308667836fe165f9ff383/src/configuration.coffee#L15.

You can force the SDK to use HTTPS by providing the secure attribute, e.g.:

<CloudinaryContext cloudName="demo" secure>
     <Image publicId="nice_couple" width="300" crop="scale" />
</CloudinaryContext>

See full example here - https://codepen.io/eitanp461/pen/pOZwJe.
You can copy the HTML from the pen to a local server and see how the secure attribute affects the image delivery URL.

You can find a complete list of supported configuration parameters here - https://cloudinary.com/documentation/solution_overview#configuration_parameters

from cloudinary-react.

pho3nixf1re avatar pho3nixf1re commented on August 15, 2024 1

The problem for us is that we do SSR which does not have access to window.location.protocol. So when it is rehydrated in the client not only is it mixed content but the app HTML does not match what React renders causing issues. The solution is manually setting the secure option.

from cloudinary-react.

ronnyhaase avatar ronnyhaase commented on August 15, 2024

Hello, we noticed the same issue just today with v1.1.0.

from cloudinary-react.

strausr avatar strausr commented on August 15, 2024

@ronnyhaase did you try the solution above?

from cloudinary-react.

ronnyhaase avatar ronnyhaase commented on August 15, 2024

Yes I did, @strausr and it works.
But I think it would be nice if that wouldn't be necessary and to have a look at the actual reason.

from cloudinary-react.

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.