Code: Select all
$http({
method: "POST",
url: "http://localhost:8000/path/to/api/",
headers: {
'Authorization': "stuff",
'Accept': "application/json"
},
data: {
addon_version: browser.runtime.getManifest().version
}
})
Now I've come over this page https://developer.mozilla.org/en-US/doc ... st-Headers which says that this is the preflight request.
My server is not configured for CORS and I have added host permission to access my localhost in manifest.json:
Code: Select all
"permissions": [
"*://localhost:8000/*",
"storage",
"notifications"
]