validate the service host
All checks were successful
Publish Docker Image / docker (push) Successful in 1m10s
All checks were successful
Publish Docker Image / docker (push) Successful in 1m10s
This commit is contained in:
parent
e65d84c915
commit
d37c414466
@ -19,6 +19,11 @@ class AddCommand(Command):
|
||||
print(f"Router \"{name}\" already exists")
|
||||
return
|
||||
|
||||
# Validate if the service host is a valid URL
|
||||
if not serviceHost.startswith("http://") and not serviceHost.startswith("https://"):
|
||||
print(f"Service host \"{serviceHost}\" is not a valid URL")
|
||||
return
|
||||
|
||||
print(f"Adding \"{domain}\" -> \"{serviceHost}\"")
|
||||
|
||||
traefikConfig.addRouter(name, domain, serviceHost)
|
||||
|
Loading…
Reference in New Issue
Block a user