From a673b4e1807d97d5ce43e7119b49e19943e8cddf Mon Sep 17 00:00:00 2001 From: Robert O'Rourke Date: Fri, 17 Sep 2021 12:53:31 +0000 Subject: [PATCH] Fix `/uploads` path for S3 images Fixes #334 --- inc/composer/class-docker-compose-generator.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/composer/class-docker-compose-generator.php b/inc/composer/class-docker-compose-generator.php index 31cd2580..c2a2920c 100644 --- a/inc/composer/class-docker-compose-generator.php +++ b/inc/composer/class-docker-compose-generator.php @@ -417,7 +417,9 @@ protected function get_service_s3() : array { 'traefik.port=9000', 'traefik.protocol=http', 'traefik.docker.network=proxy', - "traefik.frontend.rule=HostRegexp:s3-{$this->hostname}", + "traefik.api.frontend.rule=HostRegexp:s3-{$this->hostname}", + 'traefik.client.frontend.passHostHeader=false', + "traefik.client.frontend.rule=HostRegexp:{$this->hostname},{subdomain:[a-z.-_]+}.{$this->hostname};PathPrefix:/uploads;AddPrefix:/s3-{$this->project_name}", ], ], 's3-sync-to-host' => [