I'm trying to run an AJAX request in a Crossrider extension but I get a CSP related error.
Here's my code (modified for privacy):
$.ajax({
url : "https://example.com/...",
type : 'POST',
dataType : 'json',
data : {user: "user", pass: "pass"}
}).done(function(data) {
console.log("POST Succeeded");
}).fail(function(a, b, c, d) {
console.log("POST Failed");
});
If I run the code from the extension it doesn't work and it gives an "Access Denied" error!
Why cannot I run the request in my Crossrider extension?