Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

URL Expanding doesn't work on HTTPS sites #35

Open
mgoodfellow opened this issue Jan 14, 2016 · 1 comment
Open

URL Expanding doesn't work on HTTPS sites #35

mgoodfellow opened this issue Jan 14, 2016 · 1 comment

Comments

@mgoodfellow
Copy link

Unfortunately, the URL expanding doesn't work on HTTPS sites due to Same Origin Policy. The URL expanding services don't offer HTTPS access to their API, so the ajax request will be blocked by the browser.

See an explanation on stackoverflow

The effect of this is that (for example) shortened youtube (youtu.be) URLs will not be embedded correctly if your site runs on HTTPS.

One solution is to proxy the calls via another service (in our case we are using our servers to do this), thereby meaning we adhere to Same Origin Policy, and it is also an HTTPS call.

An enhancement to the library (which I plan to PR soon) would be to have the URL expanding service to be configurable, due to different API implementations, possibly using a callback would be the best method.

@petertwise
Copy link

For youtu.be in particular, just remove it completely from the list of url shorteners. The youtube regex works fine for this without a 3rd party expander.
see starfishmod#123

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants