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

Enable to use preview both SSL site and non-SSL site #11

Merged
merged 1 commit into from Jan 24, 2013

Conversation

tbaba
Copy link
Contributor

@tbaba tbaba commented Jan 8, 2013

Hi embed.ly team,

We use jquery.preview.js on SSL site, but this javascript uses HTTP request inner script as following:

ajax : function(data){
  // Make the request to Embedly. Note we are using the
  // preview endpoint: http://embed.ly/docs/endpoints/1/preview
  $.ajax({
    url: 'http://api.embed.ly/1/preview',
    dataType: 'jsonp',
    data: data,
    success: this._callback,
    error: this.error
  });
}

This causes a browser error. (e.g. [blocked] The page at https://example.com/ ran insecure content from ...)

So in this PR, I have changed the request url from HTTP only to using location.protocol.

screeley added a commit that referenced this pull request Jan 24, 2013
Enable to use preview both SSL site and non-SSL site
@screeley screeley merged commit 39619b3 into embedly:master Jan 24, 2013
@screeley
Copy link
Contributor

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants