Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: local development via http #76

Merged
merged 9 commits into from
May 9, 2022
Merged

chore: local development via http #76

merged 9 commits into from
May 9, 2022

Conversation

gryevns
Copy link
Member

@gryevns gryevns commented Apr 19, 2022

I want to be able to use embed for local development/testing but am currently restricted because of the hostToUrl logic. We currently map both the iframeUrl and apiUrl to https by default unless the hostname of the provided value equals one of localhost or 127.0.0.1. This doesn't work for my local setup as the embed iframe is available at http://embed.localhost.

> ['localhost', '127.0.0.1'].includes(new URL('http://embed.localhost').hostname)
false

This change adds a new optional prop to embed (secure) which can be used to force http rather than the default https.

Release Notes

Updates handling of iframeHost and apiHost so that both use https by default. If you wish to use http instead you should pass a new prop secure={false} to embed.

@douglaseggleton
Copy link
Collaborator

LGTM

Copy link
Collaborator

@douglaseggleton douglaseggleton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cbetta how do you feel about this?

@gryevns gryevns added the minor Increment the minor version when merged label Apr 20, 2022
@gryevns gryevns added the release Create a release when this pr is merged label Apr 21, 2022
@gryevns gryevns merged commit 3c26cef into main May 9, 2022
@gryevns gryevns deleted the local-dev-http branch May 9, 2022 09:40
@gr4vy-code
Copy link
Collaborator

🚀 PR was released in v2.10.0 🚀

@gr4vy-code gr4vy-code added the released Issue or pull request released label May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged release Create a release when this pr is merged released Issue or pull request released
Development

Successfully merging this pull request may close these issues.

None yet

4 participants