Welcome Guest, Not a member yet? Register   Sign In
Protecting controller action access

I have a controller method/function/action that produces a CSV file of certain database records. What would be the best way to limit access to this function?

I don't want to use authentication on the site itself, but could use a DB table of allowed URL's or IP's or similar. htaccess would be another option. There's no real data/security issue as it's only data that could be scraped directly from the site anyway.

An external server will be downloading the CSV.



Something like this:
public function index()
    // switch ($_SERVER['REMOTE_ADDR'])
    switch ($this->input->ip_address())
        case '': // IP Address to check for etc;
            // your code here...



Theme © iAndrew 2016 - Forum software by © MyBB