contentful / experience-builder

https://www.contentful.com/developers/docs/experiences/what-are-experiences/
MIT License
6 stars 1 forks source link

fix: convert protocol agnostic image asset url to https [ALT-639] #499

Closed primeinteger closed 2 months ago

primeinteger commented 2 months ago

Purpose

Changes the getOptimizedImageUrl method to specify https instead of using protocol agnostic urls that come back from the image API.

This prevents the "Mixed Content" error when running the hosted app locally on http.

I tested images and background images with the test-app running locally, and with the hosted test-app on vercel and I'm not seeing any unexpected side effects.

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
experience-builder-test-app ✅ Ready (Inspect) Visit Preview Mar 19, 2024 3:11pm
elylucas commented 2 months ago

I think your code will cover it, but probably good to test a manually bound image url as well

primeinteger commented 2 months ago

probably good to test a manually bound image url as well

Manual bound image urls don't go through this method, so those are served up exactly as the user entered them. Would we want to alter a url that the user entered manually?