diff --git a/src/main.js b/src/main.js index d24192a..9e3d357 100644 --- a/src/main.js +++ b/src/main.js @@ -2,7 +2,7 @@ import axios from "axios"; let pictureId = document.getElementById("CatGirlPicture"); pictureId.onclick = function() { - axios.get(location.href + "rand").then(function (response) { + axios.get(location.protocol + "//" + location.host + "/rand").then(function (response) { console.log(response.data) document.getElementById("CatGirlPicture").setAttribute("src", response.data); });