Does anyone know how to add or create a custom HTTP header using JavaScript or jQuery?
Assuming JQuery ajax, you can add custom headers like -
$.ajax({ url: url, beforeSend: function(xhr) { xhr.setRequestHeader("custom_header", "value"); }, success: function(data) { } });