feat(ci): use nginx for minio proxy (#605)
This commit is contained in:
@@ -6,7 +6,7 @@ export LISTEN_ADDR=":8888"
|
||||
export LOG_LEVEL="debug"
|
||||
export MAX_REQUEST_BODY_SIZE=1073741824
|
||||
export SERVER_HOST="localhost${LISTEN_ADDR}"
|
||||
export MINIO_PROXY_ENDPOINT=":8889"
|
||||
export MINIO_PROXY_ENDPOINT=""
|
||||
export USE_SSL="0"
|
||||
export SSL_CERT_FILE=""
|
||||
export SSL_KEY_FILE=""
|
||||
|
||||
@@ -24,6 +24,25 @@ server {
|
||||
# SSL/TLS settings
|
||||
proxy_ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
proxy_ssl_verify off;
|
||||
|
||||
|
||||
sub_filter ':8889' ':8888/local_storage';
|
||||
sub_filter 'minio:9000' '$http_host/local_storage';
|
||||
sub_filter_once off;
|
||||
sub_filter_types 'application/json';
|
||||
}
|
||||
|
||||
location /local_storage/ {
|
||||
if ($args ~* "(^|.*&)x-wf-file_name=[^&]*(&.*|$)") {
|
||||
set $args $1$2;
|
||||
}
|
||||
if ($args ~* "^x-wf-file_name=[^&]*$") {
|
||||
set $args "";
|
||||
}
|
||||
|
||||
rewrite ^/local_storage/(.*)$ /$1 break;
|
||||
proxy_pass http://minio:9000;
|
||||
proxy_set_header Host minio:9000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,4 +81,4 @@ server {
|
||||
# proxy_ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
# proxy_ssl_verify off;
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
Reference in New Issue
Block a user