mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Fix CSRF issue on bootstrap tables
This commit is contained in:
parent
4940bf05f0
commit
dbf3a074f7
6
public/assets/js/bootstrap-table.js
vendored
6
public/assets/js/bootstrap-table.js
vendored
|
@ -254,7 +254,11 @@
|
|||
cache: true,
|
||||
contentType: 'application/json',
|
||||
dataType: 'json',
|
||||
ajaxOptions: {},
|
||||
ajaxOptions: {
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
},
|
||||
queryParams: function (params) {
|
||||
return params;
|
||||
},
|
||||
|
|
|
@ -25,9 +25,7 @@
|
|||
|
||||
<link rel="shortcut icon" type="image/ico" href="{{ asset('favicon.ico') }}">
|
||||
|
||||
<script>
|
||||
window.Laravel = { csrfToken: '{{ csrf_token() }}' };
|
||||
</script>
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<style>
|
||||
@if ($snipeSettings)
|
||||
|
@ -275,6 +273,7 @@
|
|||
|
||||
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
@if (Auth::check())
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
@if (Auth::user()->present()->gravatar())
|
||||
|
@ -312,6 +311,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
|
||||
@can('superadmin')
|
||||
|
|
Loading…
Reference in a new issue