Trying to read a file from a server on my background.js inside a chrome extension and having lots of trouble. Sorry if I post it the wrong way I'm new to the community lol my background.js
var x = getAuth();
function getAuth(){
const url = chrome.runtime.getURL('https://blablabla.com/content/uploads/asd/01/users.txt');
fetch(url)
.then(() => console.log(response))
}
my manfest
"permissions": [
"https://blablabla.com/content/uploads/asd/01/users.txt"
],
"background":{"scripts":["js/background.js"]},
"web_accessible_resources": [
"https://blablabla.com/content/uploads/asd/01/users.txt"
],
this is what I get:
Failed to load resource: net::ERR_FILE_NOT_FOUND Uncaught (in promise) TypeError: Failed to fetch
Am I missing something?Thx for your help guys