Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide embedly javascript key?

I'm working with Embedly and found out that the key I use, and pay for, in the Embedly javascript is plainly visible as anyone can just "Inspect Element" and see the key.

How can I hide that part of the javascript, the key part, from people just using "Inspect Element"?

<script type="text/javascript">
  $('document').ready(function(){
    $('div.featuredGame').embedly({
      maxWidth: 200,
      maxHeight: 140,
      key: 'KEY REMOVED'
    });
  });   
</script>
like image 540
tnw Avatar asked Jul 22 '11 14:07

tnw


2 Answers

you could try and obfuscate it? Here's a js obfuscator you could use.

Its not 100% secure, but it at least hides your key, unless someone REALLY wanted to decode it.

like image 66
Jordan Foreman Avatar answered Nov 18 '22 23:11

Jordan Foreman


Embedly now added a securing keys section in response to this problem. https://blog.embed.ly/securing-keys-f8aca8e6d180

like image 3
tnw Avatar answered Nov 18 '22 22:11

tnw