mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
www/caddy: Fix wildcard certificate extraction for widget (#4385)
* www/caddy: Fix wildcard certificate extraction for widget Co-authored-by: Franco Fichtner <franco@lastsummer.de> --------- Co-authored-by: Franco Fichtner <franco@lastsummer.de>
This commit is contained in:
co-authored by
Franco Fichtner
parent
d1a5ee6daa
commit
6d79d32ea8
@@ -1,5 +1,6 @@
|
||||
PLUGIN_NAME= caddy
|
||||
PLUGIN_VERSION= 1.7.5
|
||||
PLUGIN_REVISION= 1
|
||||
PLUGIN_DEPENDS= caddy-custom
|
||||
PLUGIN_COMMENT= Modern Reverse Proxy with Automatic HTTPS, Dynamic DNS and Layer4 Routing
|
||||
PLUGIN_MAINTAINER= cedrik@pischem.com
|
||||
|
||||
@@ -101,6 +101,8 @@ async def extract_certificate_info(cert_path):
|
||||
|
||||
# Extract the hostname from the filename
|
||||
hostname = os.path.basename(cert_path).replace('.crt', '').lower()
|
||||
if hostname.startswith("wildcard_"):
|
||||
hostname = hostname.replace("wildcard_", "*", 1)
|
||||
|
||||
return {'hostname': hostname, 'expiration_date': expiration_date_str, 'remaining_days': remaining_days}
|
||||
except asyncio.TimeoutError as e:
|
||||
|
||||
Reference in New Issue
Block a user