Hi Guys,
I am trying to convert the following Nginx code into HAProxy but seem to be having trouble figuring it out and wonder if someone could point me in the right direction.
The below code is taken from Nginx and all it does is looks for the authorization header and if the regex matches then it will direct you onto the matched backend.
server {
listen 80;
location / {
proxy_set_header Host $http_host;
if ($http_authorization ~* "^AWS4-HMAC-SHA256 Credential=ROML2P775VPAT7RLPOWU") {
# proxy the request to Minio-1
proxy_pass http://localhost:9001;
}
if ($http_authorization ~* "^AWS4-HMAC-SHA256 Credential=ENT3GYJCKCD1Q79XLP4C") {
# proxy the request to Minio-2
proxy_pass http://localhost:9002;
}
if ($http_authorization ~* "^AWS4-HMAC-SHA256 Credential=C988WQ23D98207ELOLPW") {
# proxy the request to Minio-3
proxy_pass http://localhost:9003;
}
}
}
This code was originally taken from https://github.com/krishnasrinivas/wikinotes/wiki/Minio-Multi-tenancy as I am trying to do multi tenancy with MinIO but using HAProxy to do the proxying.
If anyone has an idea or where to start, I would love to hear from you.
Kind Regards,
Majestic
3 posts - 2 participants