I have one controller which I use for ajax calls, so in jQuery I have something like:
$.ajax({
type: 'POST',
url: '<?php echo base_url().'ajax/post_message'; ?>',
data: { message: msg }
}).done(function(data) {
// handling callback here
});
here ajax/post_message is working ok, but it's also accessible from URL directly.
How can I prevent this, should place ajax file somewhere else? If so, which url I can use to access it