@@ -121,8 +127,9 @@
new Vue({
el: "#app",
data() {
+ let server_url = document.location.hostname == '' ? 'http://localhost:5750' : `http://${document.location.hostname}:5750`;
const ajax = axios.create({
- baseURL: document.location.hostname == '' ? 'http://localhost:5750' : `http://${document.location.hostname}:5750`,
+ baseURL: server_url,
timeout: 20000,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
@@ -130,6 +137,7 @@
}
});
return {
+ server_url: server_url,
keywords: '',
is_searching: false,
sources: [],