zgrossbart / jdd

A semantic JSON compare tool
http://www.jsondiff.com
Apache License 2.0
1.05k stars 183 forks source link

http to https in index.html #35

Closed unmilb closed 4 years ago

unmilb commented 4 years ago

If on http gives below error if the container is launched on https

  1. “Mixed content blocked” when running an HTTP AJAX operation in an HTTPS page
  2. Uncaught ReferenceError: jQuery is not defined
zgrossbart commented 4 years ago

Thank you for the PR. JSONDiff doesn't support HTTPS since it doesn't send any confidential data anywhere. It also doesn't have a signer certificate. Can you please tell me more about this PR and what case it's solving.

unmilb commented 4 years ago

So, In a case where environment is serving all the internal/external endpoint on https this will come in the picture. Eg I want to run this behind a https ingress it will then serve on https but now all the urls have to route over https but the one googleapi using is on http so as it hits on the http I get the 1st error in my previous comment. Another problem it could solve is if lets say I have a domain called https://utilities.zgrossbart.com/ and its having two paths /jsondiff and /yamldiff, assuming yamldiff shares some confidential data due to which it has to be https but since am using a generic domain of utilities where I can add many other such utility in future jsondiff will throw the errors in my previous comment. Also I agree to what you said that it doesn't send any confidential data but I would not prefer if all my links in environment are https except one. Thank you

zgrossbart commented 4 years ago

That makes a lot of sense. Thank you for the explanation.

ToadKing commented 4 years ago

An alternative solution would be to omit the protocol in the tag, so it just inherits whatever protocol the user-agent is using, like "//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js".