Skip to content

Commit 5324b89

Browse files
Victriddekobon
authored andcommitted
Add 301 redirection to non-slash trailing requests
- Added a variable `STATIC_SITE_HOSTING` to enable - Tests modified to include the static site hosting Signed-off-by: Elijah Zupancic <e.zupancic@f5.com>
1 parent 33840bd commit 5324b89

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

test/data/bucket-1/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Test whether redirects to index.html
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
static index

test/data/bucket-1/statichost/noindexdir/multipledir/index.html

Whitespace-only changes.

test/data/bucket-1/statichost/noindexdir/noindex.html

Whitespace-only changes.

test/docker-compose.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ services:
55
# If minio client is up and running properly, we are reasonably sure that
66
# minio has properly started. That's why we depend on it here.
77
depends_on:
8-
- "minio-client"
8+
minio:
9+
condition: service_healthy
910
image: "nginx-s3-gateway"
1011
ports:
1112
- "8989:80/tcp"
@@ -26,6 +27,7 @@ services:
2627
PROVIDE_INDEX_PAGE:
2728
APPEND_SLASH_FOR_POSSIBLE_DIRECTORY:
2829
AWS_SIGS_VERSION:
30+
STATIC_SITE_HOSTING:
2931
PROXY_CACHE_VALID_OK: "1h"
3032
PROXY_CACHE_VALID_NOTFOUND: "1m"
3133
PROXY_CACHE_VALID_FORBIDDEN: "30s"
@@ -42,12 +44,8 @@ services:
4244
MINIO_REGION_NAME: "us-east-1"
4345
MINIO_DOMAIN: "minio"
4446
MINIO_BROWSER: "off"
45-
minio-client:
46-
depends_on:
47-
- "minio"
48-
image: "minio/mc"
49-
restart: "no"
50-
command: "admin trace --verbose nginx-test-gateway"
51-
environment:
52-
MC_HOST_nginx-test-gateway: "http://AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY@minio:9000"
53-
47+
healthcheck:
48+
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
49+
interval: 5s
50+
timeout: 3s
51+
retries: 3

0 commit comments

Comments
 (0)