mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
fix(app): fix app ingress edge cases [EE-5663] (#9150)
Co-authored-by: testa113 <testa113>
This commit is contained in:
parent
8b11e1678e
commit
c752b98120
6 changed files with 44 additions and 10 deletions
|
@ -154,6 +154,8 @@ export function generateNewIngressesFromFormPaths(
|
|||
return newIngresses;
|
||||
}
|
||||
|
||||
/** prependWithSlash puts a '/' in front of a string if there isn't one there already. If the string is empty, it stays empty */
|
||||
export function prependWithSlash(path?: string) {
|
||||
return path?.startsWith('/') ? path : `/${path}`;
|
||||
if (!path) return '';
|
||||
return path.startsWith('/') ? path : `/${path}`;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue