1
I am using Axios by Cdn and error appears: "Uncaught Error: URL contains XSS Injection Attempt"
The Javascript code of the main_axios.js file
axios.get('https://api.github.com/users/diego3g')
.then(function(response){
console.log(response);
})
.catch(function(error){
console.warn(error);
});
THE HTML
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script src='https://unpkg.com/axios/dist/axios.min.js'></script>
<script src='main_axios.js'></script>
</body>
</html>
Is that all the code you’re using? I just tested it and it’s working
– rnd_rss
I don’t know what’s going on. In the folder where are the 2 files "C: Users User Documents Programming Asynchronous" the error happens, but I just tested creating other 2 files with the same code on the desktop and they worked.
– Gustavo Nascimento
If you are running without a server?
– novic
No, it’s just these two files
– Gustavo Nascimento
I changed the name of the folder "Javascript" to anything else that worked normal
– Gustavo Nascimento
Gustavo, I had the same problem. Use version 0.18 of Axios, the 0.19 is not working.
– Ana