From 80a90b4ac45239436d26a74300876bebb28ce135 Mon Sep 17 00:00:00 2001 From: Robert O'Rourke Date: Fri, 17 Sep 2021 13:53:31 +0100 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 b19d9850..be6314c6 100644 --- a/inc/composer/class-docker-compose-generator.php +++ b/inc/composer/class-docker-compose-generator.php @@ -449,7 +449,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' => [