server/src/config/session.php
changeset 2 00e2916104fe
parent 1 01a844d292ac
equal deleted inserted replaced
1:01a844d292ac 2:00e2916104fe
     1 <?php
     1 <?php
     2 
     2 
     3 return [
     3 return [
     4 
     4 
     5 	/*
     5     /*
     6 	|--------------------------------------------------------------------------
     6     |--------------------------------------------------------------------------
     7 	| Default Session Driver
     7     | Default Session Driver
     8 	|--------------------------------------------------------------------------
     8     |--------------------------------------------------------------------------
     9 	|
     9     |
    10 	| This option controls the default session "driver" that will be used on
    10     | This option controls the default session "driver" that will be used on
    11 	| requests. By default, we will use the lightweight native driver but
    11     | requests. By default, we will use the lightweight native driver but
    12 	| you may specify any of the other wonderful drivers provided here.
    12     | you may specify any of the other wonderful drivers provided here.
    13 	|
    13     |
    14 	| Supported: "file", "cookie", "database", "apc",
    14     | Supported: "file", "cookie", "database", "apc",
    15 	|            "memcached", "redis", "array"
    15     |            "memcached", "redis", "array"
    16 	|
    16     |
    17 	*/
    17     */
    18 
    18 
    19 	'driver' => env('SESSION_DRIVER', 'file'),
    19     'driver' => env('SESSION_DRIVER', 'file'),
    20 
    20 
    21 	/*
    21     /*
    22 	|--------------------------------------------------------------------------
    22     |--------------------------------------------------------------------------
    23 	| Session Lifetime
    23     | Session Lifetime
    24 	|--------------------------------------------------------------------------
    24     |--------------------------------------------------------------------------
    25 	|
    25     |
    26 	| Here you may specify the number of minutes that you wish the session
    26     | Here you may specify the number of minutes that you wish the session
    27 	| to be allowed to remain idle before it expires. If you want them
    27     | to be allowed to remain idle before it expires. If you want them
    28 	| to immediately expire on the browser closing, set that option.
    28     | to immediately expire on the browser closing, set that option.
    29 	|
    29     |
    30 	*/
    30     */
    31 
    31 
    32 	'lifetime' => 120,
    32     'lifetime' => 120,
    33 
    33 
    34 	'expire_on_close' => false,
    34     'expire_on_close' => false,
    35 
    35 
    36 	/*
    36     /*
    37 	|--------------------------------------------------------------------------
    37     |--------------------------------------------------------------------------
    38 	| Session Encryption
    38     | Session Encryption
    39 	|--------------------------------------------------------------------------
    39     |--------------------------------------------------------------------------
    40 	|
    40     |
    41 	| This option allows you to easily specify that all of your session data
    41     | This option allows you to easily specify that all of your session data
    42 	| should be encrypted before it is stored. All encryption will be run
    42     | should be encrypted before it is stored. All encryption will be run
    43 	| automatically by Laravel and you can use the Session like normal.
    43     | automatically by Laravel and you can use the Session like normal.
    44 	|
    44     |
    45 	*/
    45     */
    46 
    46 
    47 	'encrypt' => false,
    47     'encrypt' => false,
    48 
    48 
    49 	/*
    49     /*
    50 	|--------------------------------------------------------------------------
    50     |--------------------------------------------------------------------------
    51 	| Session File Location
    51     | Session File Location
    52 	|--------------------------------------------------------------------------
    52     |--------------------------------------------------------------------------
    53 	|
    53     |
    54 	| When using the native session driver, we need a location where session
    54     | When using the native session driver, we need a location where session
    55 	| files may be stored. A default has been set for you but a different
    55     | files may be stored. A default has been set for you but a different
    56 	| location may be specified. This is only needed for file sessions.
    56     | location may be specified. This is only needed for file sessions.
    57 	|
    57     |
    58 	*/
    58     */
    59 
    59 
    60 	'files' => storage_path().'/framework/sessions',
    60     'files' => storage_path().'/framework/sessions',
    61 
    61 
    62 	/*
    62     /*
    63 	|--------------------------------------------------------------------------
    63     |--------------------------------------------------------------------------
    64 	| Session Database Connection
    64     | Session Database Connection
    65 	|--------------------------------------------------------------------------
    65     |--------------------------------------------------------------------------
    66 	|
    66     |
    67 	| When using the "database" or "redis" session drivers, you may specify a
    67     | When using the "database" or "redis" session drivers, you may specify a
    68 	| connection that should be used to manage these sessions. This should
    68     | connection that should be used to manage these sessions. This should
    69 	| correspond to a connection in your database configuration options.
    69     | correspond to a connection in your database configuration options.
    70 	|
    70     |
    71 	*/
    71     */
    72 
    72 
    73 	'connection' => null,
    73     'connection' => null,
    74 
    74 
    75 	/*
    75     /*
    76 	|--------------------------------------------------------------------------
    76     |--------------------------------------------------------------------------
    77 	| Session Database Table
    77     | Session Database Table
    78 	|--------------------------------------------------------------------------
    78     |--------------------------------------------------------------------------
    79 	|
    79     |
    80 	| When using the "database" session driver, you may specify the table we
    80     | When using the "database" session driver, you may specify the table we
    81 	| should use to manage the sessions. Of course, a sensible default is
    81     | should use to manage the sessions. Of course, a sensible default is
    82 	| provided for you; however, you are free to change this as needed.
    82     | provided for you; however, you are free to change this as needed.
    83 	|
    83     |
    84 	*/
    84     */
    85 
    85 
    86 	'table' => 'sessions',
    86     'table' => 'sessions',
    87 
    87 
    88 	/*
    88     /*
    89 	|--------------------------------------------------------------------------
    89     |--------------------------------------------------------------------------
    90 	| Session Sweeping Lottery
    90     | Session Sweeping Lottery
    91 	|--------------------------------------------------------------------------
    91     |--------------------------------------------------------------------------
    92 	|
    92     |
    93 	| Some session drivers must manually sweep their storage location to get
    93     | Some session drivers must manually sweep their storage location to get
    94 	| rid of old sessions from storage. Here are the chances that it will
    94     | rid of old sessions from storage. Here are the chances that it will
    95 	| happen on a given request. By default, the odds are 2 out of 100.
    95     | happen on a given request. By default, the odds are 2 out of 100.
    96 	|
    96     |
    97 	*/
    97     */
    98 
    98 
    99 	'lottery' => [2, 100],
    99     'lottery' => [2, 100],
   100 
   100 
   101 	/*
   101     /*
   102 	|--------------------------------------------------------------------------
   102     |--------------------------------------------------------------------------
   103 	| Session Cookie Name
   103     | Session Cookie Name
   104 	|--------------------------------------------------------------------------
   104     |--------------------------------------------------------------------------
   105 	|
   105     |
   106 	| Here you may change the name of the cookie used to identify a session
   106     | Here you may change the name of the cookie used to identify a session
   107 	| instance by ID. The name specified here will get used every time a
   107     | instance by ID. The name specified here will get used every time a
   108 	| new session cookie is created by the framework for every driver.
   108     | new session cookie is created by the framework for every driver.
   109 	|
   109     |
   110 	*/
   110     */
   111 
   111 
   112 	'cookie' => 'laravel_session',
   112     'cookie' => 'laravel_session',
   113 
   113 
   114 	/*
   114     /*
   115 	|--------------------------------------------------------------------------
   115     |--------------------------------------------------------------------------
   116 	| Session Cookie Path
   116     | Session Cookie Path
   117 	|--------------------------------------------------------------------------
   117     |--------------------------------------------------------------------------
   118 	|
   118     |
   119 	| The session cookie path determines the path for which the cookie will
   119     | The session cookie path determines the path for which the cookie will
   120 	| be regarded as available. Typically, this will be the root path of
   120     | be regarded as available. Typically, this will be the root path of
   121 	| your application but you are free to change this when necessary.
   121     | your application but you are free to change this when necessary.
   122 	|
   122     |
   123 	*/
   123     */
   124 
   124 
   125 	'path' => '/',
   125     'path' => '/',
   126 
   126 
   127 	/*
   127     /*
   128 	|--------------------------------------------------------------------------
   128     |--------------------------------------------------------------------------
   129 	| Session Cookie Domain
   129     | Session Cookie Domain
   130 	|--------------------------------------------------------------------------
   130     |--------------------------------------------------------------------------
   131 	|
   131     |
   132 	| Here you may change the domain of the cookie used to identify a session
   132     | Here you may change the domain of the cookie used to identify a session
   133 	| in your application. This will determine which domains the cookie is
   133     | in your application. This will determine which domains the cookie is
   134 	| available to in your application. A sensible default has been set.
   134     | available to in your application. A sensible default has been set.
   135 	|
   135     |
   136 	*/
   136     */
   137 
   137 
   138 	'domain' => null,
   138     'domain' => null,
   139 
   139 
   140 	/*
   140     /*
   141 	|--------------------------------------------------------------------------
   141     |--------------------------------------------------------------------------
   142 	| HTTPS Only Cookies
   142     | HTTPS Only Cookies
   143 	|--------------------------------------------------------------------------
   143     |--------------------------------------------------------------------------
   144 	|
   144     |
   145 	| By setting this option to true, session cookies will only be sent back
   145     | By setting this option to true, session cookies will only be sent back
   146 	| to the server if the browser has a HTTPS connection. This will keep
   146     | to the server if the browser has a HTTPS connection. This will keep
   147 	| the cookie from being sent to you if it can not be done securely.
   147     | the cookie from being sent to you if it can not be done securely.
   148 	|
   148     |
   149 	*/
   149     */
   150 
   150 
   151 	'secure' => false,
   151     'secure' => false,
   152 
   152 
   153 ];
   153 ];