prismatic-io / embedded

Prismatic's library for embedding Prismatic.io into your application.
MIT License
24 stars 3 forks source link

Use url-join to generate iframe src properties, to account for trailing slashes #44

Closed taylorreece closed 9 months ago

taylorreece commented 10 months ago

If you initialize the Prismatic embedded SDK with a URL that has a trailing slash (i.e. https://app.ap-southeast-2.prismatic.io/ vs https://app.ap-southeast-2.prismatic.io), an iframe is built with double-slashes (i.e. https://app.ap-southeast-2.prismatic.io//integration-marketplace?embed=....). The double-slashes result in a 404.

Rather than using string concatenation for iframe src property, let's use url-join, which handles trailing slashes for you.