pathprefix

This commit is contained in:
Andras Bacsai 2023-05-17 13:21:51 +02:00
parent 6c71d168c4
commit 5f104c58f2

View File

@ -397,7 +397,7 @@ private function set_labels_for_applications()
$slug = Str::slug($url); $slug = Str::slug($url);
$label_id = "{$this->application->uuid}-{$slug}"; $label_id = "{$this->application->uuid}-{$slug}";
if ($path === '/') { if ($path === '/') {
$labels[] = "traefik.http.routers.{$label_id}.rule=Host(`{$host}`) && Path(`{$path}`)"; $labels[] = "traefik.http.routers.{$label_id}.rule=Host(`{$host}`) && PathPrefix(`{$path}`)";
} else { } else {
$labels[] = "traefik.http.routers.{$label_id}.rule=Host(`{$host}`) && PathPrefix(`{$path}`)"; $labels[] = "traefik.http.routers.{$label_id}.rule=Host(`{$host}`) && PathPrefix(`{$path}`)";
$labels[] = "traefik.http.routers.{$label_id}.middlewares={$label_id}-stripprefix"; $labels[] = "traefik.http.routers.{$label_id}.middlewares={$label_id}-stripprefix";