增加外网访问风险提示
parent
471a2ae0c2
commit
2d84465b47
|
@ -27,6 +27,12 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
|
<div style="padding:5px;margin-bottom: 20px;">
|
||||||
|
<div style="color:#bbb;">
|
||||||
|
<p>暂未做登录验证,使用DDNS等方式外网访问存在风险!!!</p>
|
||||||
|
<p>服务器地址:{{ server_url }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div style="width:1000px;margin: 0 auto;padding:5px;">
|
<div style="width:1000px;margin: 0 auto;padding:5px;">
|
||||||
<div style="margin: 10px 0">
|
<div style="margin: 10px 0">
|
||||||
<label>选择搜索源:</label>
|
<label>选择搜索源:</label>
|
||||||
|
@ -121,8 +127,9 @@
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
data() {
|
data() {
|
||||||
|
let server_url = document.location.hostname == '' ? 'http://localhost:5750' : `http://${document.location.hostname}:5750`;
|
||||||
const ajax = axios.create({
|
const ajax = axios.create({
|
||||||
baseURL: document.location.hostname == '' ? 'http://localhost:5750' : `http://${document.location.hostname}:5750`,
|
baseURL: server_url,
|
||||||
timeout: 20000,
|
timeout: 20000,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
@ -130,6 +137,7 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
server_url: server_url,
|
||||||
keywords: '',
|
keywords: '',
|
||||||
is_searching: false,
|
is_searching: false,
|
||||||
sources: [],
|
sources: [],
|
||||||
|
|
Loading…
Reference in New Issue