Welcome Guest, Not a member yet? Register   Sign In
cross site posts
#1

[eluser]otn3m3m[/eluser]
My website controller accepts input from jquery ajax post in a view. Is there a way to prevent another external site from invoking my controller function?
#2

[eluser]bretticus[/eluser]
The traditional way is to check the referrer:

Code:
$referrer = $_SERVER['HTTP_REFERER'];

However, headers are easy to fake. Better yet, make sure your users have an authenticated session.




Theme © iAndrew 2016 - Forum software by © MyBB