Fixed #13256 - Added option to switch to localStorage instead of cookies

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-07-12 20:06:17 +01:00
parent 44231fa52c
commit c1c2c38995
3 changed files with 17 additions and 0 deletions

View file

@ -85,6 +85,7 @@ COOKIE_NAME=snipeit_session
COOKIE_DOMAIN=null
SECURE_COOKIES=false
API_TOKEN_EXPIRATION_YEARS=15
BS_TABLE_STORAGE=cookieStorage
# --------------------------------------------
# OPTIONAL: SECURITY HEADER SETTINGS

View file

@ -158,4 +158,19 @@ return [
'secure' => env('SECURE_COOKIES', false),
/*
|--------------------------------------------------------------------------
| Bootstrap Table Storage Type
|--------------------------------------------------------------------------
|
| Set the storage that this Bootstrap Table will use.
| Valid options are:
| - cookieStorage
| - localStorage: use this if you have a LOT of custom fields and are getting a REQUEST TOO LARGE error
| - sessionStorage
|
*/
'bs_table_storage' => env('BS_TABLE_STORAGE', 'cookieStorage'),
];

View file

@ -55,6 +55,7 @@
stickyHeaderOffsetY: stickyHeaderOffsetY + 'px',
undefinedText: '',
iconsPrefix: 'fa',
cookieStorage: '{{ config('session.bs_table_storage') }}',
cookie: true,
cookieExpire: '2y',
mobileResponsive: true,