Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
cc0f2d7074
7 changed files with 16 additions and 7 deletions
|
@ -96,6 +96,7 @@ APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1
|
||||||
ALLOW_IFRAMING=false
|
ALLOW_IFRAMING=false
|
||||||
REFERRER_POLICY=same-origin
|
REFERRER_POLICY=same-origin
|
||||||
ENABLE_CSP=false
|
ENABLE_CSP=false
|
||||||
|
ADDITIONAL_CSP_URLS=null
|
||||||
CORS_ALLOWED_ORIGINS=null
|
CORS_ALLOWED_ORIGINS=null
|
||||||
ENABLE_HSTS=false
|
ENABLE_HSTS=false
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ class ProfileController extends Controller
|
||||||
|
|
||||||
|
|
||||||
if ($user->save()) {
|
if ($user->save()) {
|
||||||
return redirect()->route('profile')->with('success', 'Account successfully updated');
|
return redirect()->route('profile')->with('success', trans('account.general.profile_updated'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->back()->withInput()->withErrors($user->getErrors());
|
return redirect()->back()->withInput()->withErrors($user->getErrors());
|
||||||
|
|
|
@ -88,13 +88,13 @@ class SecurityHeaders
|
||||||
$csp_policy[] = "connect-src 'self'";
|
$csp_policy[] = "connect-src 'self'";
|
||||||
$csp_policy[] = "object-src 'none'";
|
$csp_policy[] = "object-src 'none'";
|
||||||
$csp_policy[] = "font-src 'self' data:";
|
$csp_policy[] = "font-src 'self' data:";
|
||||||
$csp_policy[] = "img-src 'self' data: ".config('app.url').' '.env('PUBLIC_AWS_URL').' https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com';
|
$csp_policy[] = "img-src 'self' data: ".config('app.url').' '.config('app.additional_csp_urls').' '.env('PUBLIC_AWS_URL').' https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com';
|
||||||
|
|
||||||
if (config('filesystems.disks.public.driver') == 's3') {
|
if (config('filesystems.disks.public.driver') == 's3') {
|
||||||
$csp_policy[] = "img-src 'self' data: ".config('filesystems.disks.public.url');
|
$csp_policy[] = "img-src 'self' data: ".config('filesystems.disks.public.url');
|
||||||
}
|
}
|
||||||
$csp_policy = join(';', $csp_policy);
|
$csp_policy = join(';', $csp_policy);
|
||||||
|
|
||||||
$response->headers->set('Content-Security-Policy', $csp_policy);
|
$response->headers->set('Content-Security-Policy', $csp_policy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -201,6 +201,9 @@ return [
|
||||||
|
|
||||||
'enable_csp' => env('ENABLE_CSP', true),
|
'enable_csp' => env('ENABLE_CSP', true),
|
||||||
|
|
||||||
|
'additional_csp_urls' => env('ADDITIONAL_CSP_URLS', ''),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -9,4 +9,5 @@ return array(
|
||||||
'api_token_expiration_time' => 'API tokens are set to expire in:',
|
'api_token_expiration_time' => 'API tokens are set to expire in:',
|
||||||
'api_reference' => 'Please check the <a href="https://snipe-it.readme.io/reference" target="_blank">API reference</a> to
|
'api_reference' => 'Please check the <a href="https://snipe-it.readme.io/reference" target="_blank">API reference</a> to
|
||||||
find specific API endpoints and additional API documentation.',
|
find specific API endpoints and additional API documentation.',
|
||||||
|
'profile_updated' => 'Account successfully updated',
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
|
||||||
'actions' => 'Actions',
|
'actions' => 'Actions',
|
||||||
'action' => 'Action',
|
'action' => 'Action',
|
||||||
'by' => 'By',
|
'by' => 'By',
|
||||||
'item' => 'Item',
|
'item' => 'Item',
|
||||||
|
'no_matching_records' => 'No matching records found',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
|
@ -92,6 +92,9 @@
|
||||||
exportTypes: ['xlsx', 'excel', 'csv', 'pdf','json', 'xml', 'txt', 'sql', 'doc' ],
|
exportTypes: ['xlsx', 'excel', 'csv', 'pdf','json', 'xml', 'txt', 'sql', 'doc' ],
|
||||||
onLoadSuccess: function () {
|
onLoadSuccess: function () {
|
||||||
$('[data-tooltip="true"]').tooltip(); // Needed to attach tooltips after ajax call
|
$('[data-tooltip="true"]').tooltip(); // Needed to attach tooltips after ajax call
|
||||||
|
},
|
||||||
|
formatNoMatches: function () {
|
||||||
|
return '{{ trans('table.no_matching_records') }}';
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue