Welcome Guest, Not a member yet? Register   Sign In
What's the difference between the .env file and App.php?
#1

So I'm trying to learn CI 4 and I have a question. 

In the .env file there are these settings: 

Code:
# app.CSRFProtection  = false
# app.CSRFTokenName  = 'csrf_test_name'
# app.CSRFCookieName  = 'csrf_cookie_name'
# app.CSRFExpire      = 7200
# app.CSRFRegenerate  = true
# app.CSRFExcludeURIs = []


And in Config/App.php there are these:

Code:
    public $CSRFTokenName  = 'csrf_test_name';
    public $CSRFHeaderName = 'X-CSRF-TOKEN';
    public $CSRFCookieName = 'csrf_cookie_name';
    public $CSRFExpire     = 7200;
    public $CSRFRegenerate = true;
    public $CSRFRedirect   = true;

So what's the difference here? Where am I supposed to do my settings? Although I'm pretty sure it's working as it is without uncommenting the settings in the .env file. But why do they exist there?
Reply


Messages In This Thread
What's the difference between the .env file and App.php? - by philio - 09-13-2020, 08:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB