Want to protect my data source from direct access, and scripts still working. How?

Want to protect my data source from direct access, and scripts still working. How?

erhardtgergoerhardtgergo Posts: 2Questions: 1Answers: 0

Hi There!

I've successfully created a site, pwd protected it, all working fine.
But if somebody (who has the pwd to the site) wants to gain the data, it's rather simple.
You only need to view the html source, and there is the ajax source path to the file.

How can solve this while keep the scripts access?

Thanks a lot!

Answers

  • allanallan Posts: 63,096Questions: 1Answers: 10,390 Site admin

    This would be better asked in a general forum such as StackOverflow. Also Google for it and you'll find a lot of discussions on this topic.

    The answer is, there really is no perfect way. You can use obfuscation, but that is it.

    Allan

  • erhardtgergoerhardtgergo Posts: 2Questions: 1Answers: 0

    Hi Allan,

    thx for Your reply!
    I know, but i've been googleing for it for aaaages!
    And i've tried all the given solutions, none worked.
    I mean if it's not accessible than the script also can't acess it.

    I asked it here, because maybe somebody tried to find a way around this from the dataTables users...

    Anybody?

  • allanallan Posts: 63,096Questions: 1Answers: 10,390 Site admin

    There is no way around this. Its as simple as that I'm afraid. If the script can be accessed by the browser, then anyone can request it using wget, curl or simply "view source". The only option to protect your intellectual property is obfuscation. That is really the only answer you will get for client-side code.

    If that isn't acceptable then you have to move the sensitive logic part to the server where people can't access your code.

    Allan

This discussion has been closed.