HI fuel friends, today I faced a big issue and as I am still new to fuelphp I wonder how we can secure our URLs to prevent anyone from writing it and get its results, I tried the before() function with Auth class things were fine until I tried Ajax, the request gets rejected and redirected back, what I want is to be able to get json results with AJAX request but no by typing the url in the browser.
Often in combination with an environment check, so you can use a browser in development to dump the response of an API call in HTML for debugging purposes, and to give a 404 when the site runs in staging or production.