1export class FetchUtils { 2 static csrfHeaders() { 3 const csrfMetaTag = document.querySelector("[name='csrf-token']") 4 const headers = { 5 'X-CSRF-Token': csrfMetaTag ? csrfMetaTag.content : null, 6 'X-Requested-With': 'XMLHttpRequest' 7 } 8 return headers 9 } 10 11 static jsonCsrfHeaders() { 12 return {'Accept': 'application/json', 'Content-Type': 'application/json; charset=UTF-8', ...this.csrfHeaders()} 13 } 14}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.