Skip to content

Commit

Permalink
fix ghost
Browse files Browse the repository at this point in the history
  • Loading branch information
peaklabs-dev committed Nov 8, 2024
1 parent 0bc646e commit 754053a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bootstrap/helpers/docker.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,11 @@ function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_
$https_label = "https-{$loop}-{$uuid}-{$service_name}";
}
if (str($image)->contains('ghost')) {
$labels->push("traefik.http.middlewares.redir-ghost.redirectregex.regex=^{$path}/(.*)");
$labels->push('traefik.http.middlewares.redir-ghost.redirectregex.replacement=/$1');
$labels->push("traefik.http.middlewares.redir-ghost-{$uuid}.redirectregex.regex=^{$path}/(.*)");
$labels->push("traefik.http.middlewares.redir-ghost-{$uuid}.redirectregex.replacement=/$1");
$labels->push("caddy_{$loop}.handle_path.{$loop}_redir-ghost-{$uuid}.handler=rewrite");
$labels->push("caddy_{$loop}.handle_path.{$loop}_redir-ghost-{$uuid}.rewrite.regexp=^{$path}/(.*)");
$labels->push("caddy_{$loop}.handle_path.{$loop}_redir-ghost-{$uuid}.rewrite.replacement=/$1");
}

$to_www_name = "{$loop}-{$uuid}-to-www";
Expand Down

1 comment on commit 754053a

@djsisson
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You changed middleware but then still push redir-ghost to middlewares not the new one defined

754053a#diff-ae98ce31cfac929a9e768d8fb90802a393ebc4ae3bd7408fa620ecdaadd53ea8L397

Please sign in to comment.