fix file download, listen to 0.0.0.0
This commit is contained in:
parent
209bb43336
commit
8adbdb0a54
|
@ -1 +1,3 @@
|
||||||
target/release/api-test-server /usr/sbin
|
target/release/api-test-server /usr/sbin
|
||||||
|
www/images/logo-128.png /usr/share/javascript/proxmox-backup-server/images/
|
||||||
|
www/images/proxmox_logo.png /usr/share/javascript/proxmox-backup-server/images/
|
||||||
|
|
|
@ -48,6 +48,8 @@ impl ApiConfig {
|
||||||
if let Some(subdir) = self.aliases.get(&prefix) {
|
if let Some(subdir) = self.aliases.get(&prefix) {
|
||||||
filename.push(subdir);
|
filename.push(subdir);
|
||||||
for i in 1..comp_len { filename.push(components[i]) }
|
for i in 1..comp_len { filename.push(components[i]) }
|
||||||
|
} else {
|
||||||
|
for i in 0..comp_len { filename.push(components[i]) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
filename
|
filename
|
||||||
|
|
|
@ -223,23 +223,23 @@ fn get_index() -> BoxFut {
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||||
<title>Proxmox Backup Server</title>
|
<title>Proxmox Backup Server</title>
|
||||||
<link rel="icon" sizes="128x128" href="/pve2/images/logo-128.png" />
|
<link rel="icon" sizes="128x128" href="/images/logo-128.png" />
|
||||||
<link rel="apple-touch-icon" sizes="128x128" href="/pve2/images/logo-128.png" />
|
<link rel="apple-touch-icon" sizes="128x128" href="/pve2/images/logo-128.png" />
|
||||||
<link rel="stylesheet" type="text/css" href="/pve2/ext6/theme-crisp/resources/theme-crisp-all.css" />
|
<link rel="stylesheet" type="text/css" href="/extjs/theme-crisp/resources/theme-crisp-all.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="/pve2/ext6/crisp/resources/charts-all.css" />
|
<link rel="stylesheet" type="text/css" href="/extjs/crisp/resources/charts-all.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="/fontawesome/css/font-awesome.css" />
|
<link rel="stylesheet" type="text/css" href="/fontawesome/css/font-awesome.css" />
|
||||||
<script type='text/javascript'> function gettext(buf) {{ return buf; }} </script>
|
<script type='text/javascript'> function gettext(buf) {{ return buf; }} </script>
|
||||||
<script type="text/javascript" src="/pve2/ext6/ext-all-debug.js"></script>
|
<script type="text/javascript" src="/extjs/ext-all-debug.js"></script>
|
||||||
<script type="text/javascript" src="/pve2/ext6/charts-debug.js"></script>
|
<script type="text/javascript" src="/extjs/charts-debug.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Proxmox = {};
|
Proxmox = {};
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="/proxmoxlib.js"></script>
|
<script type="text/javascript" src="/widgettoolkit/proxmoxlib.js"></script>
|
||||||
<script type="text/javascript" src="/pve2/ext6/locale/locale-en.js"></script>
|
<script type="text/javascript" src="/extjs/locale/locale-en.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
Ext.History.fieldid = 'x-history-field';
|
Ext.History.fieldid = 'x-history-field';
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="/pve2/js/pbsmanagerlib.js"></script>
|
<script type="text/javascript" src="/js/pbsmanagerlib.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Fields required for history management -->
|
<!-- Fields required for history management -->
|
||||||
|
|
|
@ -64,13 +64,13 @@ fn main() {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
let addr = ([127, 0, 0, 1], 8007).into();
|
let addr = ([0, 0, 0, 0], 8007).into();
|
||||||
|
|
||||||
lazy_static!{
|
lazy_static!{
|
||||||
static ref ROUTER: Router = apitest::api3::router();
|
static ref ROUTER: Router = apitest::api3::router();
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut config = ApiConfig::new("/var/www", &ROUTER);
|
let mut config = ApiConfig::new("/usr/share/javascript/proxmox-backup-server", &ROUTER);
|
||||||
|
|
||||||
// add default dirs which includes jquery and bootstrap
|
// add default dirs which includes jquery and bootstrap
|
||||||
// my $base = '/usr/share/libpve-http-server-perl';
|
// my $base = '/usr/share/libpve-http-server-perl';
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Loading…
Reference in New Issue