Answer the question
In order to leave comments, you need to log in
How to disable user access to ajax?
Hello, tell me how you can close the user's access to ajax, in general there is a code visual link to ajax can be seen in viewing the code of the elements, the script is triggered by some action, for example, the send button was pressed and the script was executed,
<script>
$('#click').ajaxForm({
url: '/index/ajax',
dataType: 'text',
send: function(data) {
console.log(data);
data = $.parseJSON(data);
SM(data);
});
</script>
Answer the question
In order to leave comments, you need to log in
No way
. When you click, the request is made by the user's browser, which means that nothing can be
hidden. And it makes no sense to hide this data. If you do not want the user to see any data, do not give it to him ever.
Let's draw an analogy (this is when something is the same or similar).
Let's say you have a car (well, a bibika, you know what a bibika is?).
And you ask the question: how to make sure that all car thieves do not see your car (bibika) point-blank?
Now think about it (if there is anything): is it possible to do this?
It is impossible to prohibit, but you can encrypt the script in base64 and then it will not be at all obvious that there is something important in the script and it needs to be decrypted. Of course, you can always look at requests in the Network tab of the browser console, but not everyone can do this and not many will guess, the average user will not understand anything for sure.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question