Unfortunately that does not work for me. The web browser receives a cookie with a session for the first call with basic auth:
$.ajax({ type: "GET", url: "/api/hosts", beforeSend: function(xhr) { xhr.setRequestHeader ("Authorization", "Basic " + btoa( "admin:password")); }, success: function(data, textStatus, request) { console.log("succ", arguments); }, error: function() { console.log("err", arguments); } }); but the second call without basic auth which should just use the session from the cookie will fail with a 401: $.ajax({ type: "GET", url: "/api/hosts", success: function(data, textStatus, request) { console.log("succ", arguments); }, error: function() { console.log("err", arguments); } }); -- You received this message because you are subscribed to the Google Groups "foreman-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.