]> BookStack Code Mirror - bookstack/commitdiff
Update session config to match laravel
authorDan Brown <redacted>
Sun, 20 May 2018 08:38:27 +0000 (09:38 +0100)
committerDan Brown <redacted>
Sun, 20 May 2018 08:38:27 +0000 (09:38 +0100)
Includes option to set secure cookies via env.
Closes #817

config/session.php

index 8d8c14fe9aedec351242c7494627e05f5417f687..b334ffb3c255a5431e8694aa810105a980d8fe47 100644 (file)
@@ -135,7 +135,7 @@ return [
     |
     */
 
-    'domain' => null,
+    'domain' => env('SESSION_DOMAIN', null),
 
     /*
     |--------------------------------------------------------------------------
@@ -148,6 +148,34 @@ return [
     |
     */
 
-    'secure' => false,
+    'secure' => env('SESSION_SECURE_COOKIE', false),
+
+    /*
+    |--------------------------------------------------------------------------
+    | HTTP Access Only
+    |--------------------------------------------------------------------------
+    |
+    | Setting this value to true will prevent JavaScript from accessing the
+    | value of the cookie and the cookie will only be accessible through
+    | the HTTP protocol. You are free to modify this option if needed.
+    |
+    */
+
+    'http_only' => true,
+
+    /*
+    |--------------------------------------------------------------------------
+    | Same-Site Cookies
+    |--------------------------------------------------------------------------
+    |
+    | This option determines how your cookies behave when cross-site requests
+    | take place, and can be used to mitigate CSRF attacks. By default, we
+    | do not enable this as other CSRF protection services are in place.
+    |
+    | Supported: "lax", "strict"
+    |
+    */
+
+    'same_site' => null,
 
 ];