0

If I have a simple javascript string in my code:

var url = 'http://www.example.com/api/39899jkdfnkdfglhiygb3kkldflmgkd/getSecretInfo';

And I then use JSON to get the data. I then compile this using phonegap and make it available online. Can someone figure out this secret url in my code? How do I get around this?

rockstardev
  • 13,479
  • 39
  • 164
  • 296
  • You may need to rethink your architecture so that it doesn't depend on giving the user a secret and hoping they don't look at it. – bobince Aug 01 '15 at 19:17

1 Answers1

1

Can someone figure out this secret url in my code?

Yes, your app is just a zip file.

How do I get around this ?

Using obfuscation, but somebody might be able to retrieve your secret. How can I obfuscate (protect) JavaScript?

Community
  • 1
  • 1
Thom-x
  • 841
  • 1
  • 6
  • 20