mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-03 09:04:12 +02:00
allow service names with - in them in proxy
This commit is contained in:
parent
fdc821cb93
commit
85071d7aa1
2 changed files with 8 additions and 2 deletions
|
|
@ -69,8 +69,9 @@ impl ActiveInstances {
|
||||||
80,
|
80,
|
||||||
),
|
),
|
||||||
// service with instance
|
// service with instance
|
||||||
2 => {
|
2.. => {
|
||||||
let (name, service_name) = name.rsplit_once('-').unwrap();
|
let service_name = name.splitn(3, '-').last()?;
|
||||||
|
let name = &name[0..(name.len() - service_name.len() - 1)];
|
||||||
let cloud = Cloud::get_by_filter(&self.docker, Some(name.into()), &self.config)
|
let cloud = Cloud::get_by_filter(&self.docker, Some(name.into()), &self.config)
|
||||||
.await
|
.await
|
||||||
.ok()?;
|
.ok()?;
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,8 @@ pub enum ServiceType {
|
||||||
Azure,
|
Azure,
|
||||||
/// Ldap user backend
|
/// Ldap user backend
|
||||||
Ldap,
|
Ldap,
|
||||||
|
/// Ldap admin interface
|
||||||
|
LdapAdmin,
|
||||||
/// OnlyOffice
|
/// OnlyOffice
|
||||||
OnlyOffice,
|
OnlyOffice,
|
||||||
/// Libre office online
|
/// Libre office online
|
||||||
|
|
@ -304,6 +306,9 @@ impl Service {
|
||||||
ServiceType::S3mb => Some(vec![Service::ObjectStore(ObjectStore::S3mb)]),
|
ServiceType::S3mb => Some(vec![Service::ObjectStore(ObjectStore::S3mb)]),
|
||||||
ServiceType::Azure => Some(vec![Service::ObjectStore(ObjectStore::Azure)]),
|
ServiceType::Azure => Some(vec![Service::ObjectStore(ObjectStore::Azure)]),
|
||||||
ServiceType::Ldap => Some(vec![Service::Ldap(Ldap), Service::LdapAdmin(LdapAdmin)]),
|
ServiceType::Ldap => Some(vec![Service::Ldap(Ldap), Service::LdapAdmin(LdapAdmin)]),
|
||||||
|
ServiceType::LdapAdmin => {
|
||||||
|
Some(vec![Service::Ldap(Ldap), Service::LdapAdmin(LdapAdmin)])
|
||||||
|
}
|
||||||
ServiceType::OnlyOffice => Some(vec![Service::OnlyOffice(OnlyOffice)]),
|
ServiceType::OnlyOffice => Some(vec![Service::OnlyOffice(OnlyOffice)]),
|
||||||
ServiceType::Office => Some(vec![Service::Office(Office)]),
|
ServiceType::Office => Some(vec![Service::Office(Office)]),
|
||||||
ServiceType::Push => Some(vec![Service::Push(NotifyPush)]),
|
ServiceType::Push => Some(vec![Service::Push(NotifyPush)]),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue