1export async function ipGeoUserLocation(apiUrl) { 2 const urlParams = new URLSearchParams(window.location.search); 3 const ipOverride = urlParams.get("ipmask"); 4 let path = "api/ip-geo/user-location"; 5 if (/^[0-9a-f.:]+$/.test(ipOverride)) { 6 path += `?ipAddress=${encodeURIComponent(ipOverride)}`; 7 } 8 const res = await fetch(`${apiUrl}/${path}`); 9 return await res.json(); 10} 11 12// ES module counterpart of form-logic/validation.js's checkBEValidationPOST, 13// for themes (e.g. loggly-2019) whose form scripts are loaded as ES modules. 14export async function checkBEValidationPOST(validationEndpoint, data) { 15 const url = `/wp-json/solarapi/api/validation/${validationEndpoint}`; 16 const res = await fetch(url, { 17 method: "POST", 18 headers: { "Content-Type": "application/json" }, 19 body: JSON.stringify(data) 20 }); 21 return await res.json(); 22}
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.