This commit is contained in:
parent
6430dc5bc4
commit
7d861aad76
@ -14,15 +14,14 @@ class AddSubPathCommand(Command):
|
|||||||
router = args[0]
|
router = args[0]
|
||||||
domain = args[1]
|
domain = args[1]
|
||||||
path = args[2]
|
path = args[2]
|
||||||
serviceHost = args[3]
|
|
||||||
subPathName = "strip-" + router + "-" + path + "-prefix"
|
|
||||||
|
|
||||||
# Fix the path
|
# Fix the path
|
||||||
if path.startswith("/") == False:
|
if path.startswith("/") == False:
|
||||||
path = "/" + path
|
path = "/" + path
|
||||||
|
serviceHost = args[3]
|
||||||
|
subPathName = domain + path
|
||||||
|
|
||||||
if traefikConfig.hasPathRewrite(subPathName):
|
if traefikConfig.hasPathRewrite(subPathName):
|
||||||
print(f"Sub path for \"{router}\" already exists")
|
print(f"Sub path for \"{domain}{path}\" already exists")
|
||||||
return
|
return
|
||||||
|
|
||||||
if traefikConfig.hasRouter(router) == False:
|
if traefikConfig.hasRouter(router) == False:
|
||||||
|
Loading…
Reference in New Issue
Block a user