console
console copied to clipboard
Using `MINIO_BROWSER_REDIRECT_URL` without a `/` suffix results in a white page
I'm using nginx as a reverse proxy for Minio, as specified in the docs:
location /ui {
rewrite ^/ui/(.*) /$1 break;
...
}
When I set MINIO_BROWSER_REDIRECT_URL="https://minio.example.net/ui" the redirect from https://minio.example.net to https://minio.example.net/ui works, but console then displays an empty white page.
To fix this, one has to append a /: MINIO_BROWSER_REDIRECT_URL="https://minio.example.net/ui/"
Expected Behavior
Setting MINIO_BROWSER_REDIRECT_URL="https://minio.example.net/ui" should work.
Current Behavior
Setting MINIO_BROWSER_REDIRECT_URL="https://minio.example.net/ui" displays a white page and requires an / suffix to fix it.
Possible Solution
Minio should suffix the / automatically. Alternatively this could be fixed in console.
Steps to Reproduce
- Run Minio with
MINIO_SERVER_URL="https://minio.example.net"andMINIO_BROWSER_REDIRECT_URL="https://minio.example.net/ui" - Use a nginx reverse proxy as specified in the docs
- Open
https://minio.example.netin a browser - Notice the redirect to
https://minio.example.net/uiand the white page - Change
MINIO_BROWSER_REDIRECT_URLtohttps://minio.example.net/ui/, restart Minio - Open
https://minio.example.netin a browser - Notice the redirect to
https://minio.example.net/ui/and the working console
Your Environment
- MinIO version used (
minio --version):RELEASE.2023-08-09T23-30-22Z (commit-id=eb55034dfe5ef82449796c83e3126b245c5aee05) - Server setup and configuration: 3x(Minio + nginx reverse proxy) + Hetzner Load Balancer
- Operating System and version (
uname -a):Linux test1.example.net 6.1.0-11-amd64 minio/minio#1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4 (2023-08-08) x86_64 GNU/Linux - Web browser:
Firefox 116.0.3
we'll test if it works with nginx cause it seems it works without it.
Do you have a recommendation for a nginx vhost config adjustment, if others don't have this problem?
Sep 11, 2023 18:39:36 Cesar N. @.***>:
we'll test if it works with nginx cause it works without it.
— Reply to this email directly, view it on GitHub[https://github.com/minio/console/issues/3009#issuecomment-1714232468], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AASAV26NLVMDH2L3LI3QG43XZ45ENANCNFSM6AAAAAA32ADLW4]. You are receiving this because you authored the thread. [Tracking image][https://github.com/notifications/beacon/AASAV27DYEIGHSAI2MVRAT3XZ45ENA5CNFSM6AAAAAA32ADLW6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTGFUOJI.gif]
this is yet to be confirmed @hashworks (based on a internal discussion), we'll share our findings once we take a look at it. Thanks.
Added seems to previous comment :)
running
mcli admin config set local-s3 MINIO_BROWSER_REDIRECT_URL https://my.domain.com/s3/ OR
mcli admin config set local-s3 MINIO_BROWSER_REDIRECT_URL="https://my.domain.com/s3/" OR
mcli admin config set local-s3 MINIO_BROWSER_REDIRECT_URL=https://my.domain.com/s3/
on my server (as known as local-s3 in the config.json with accessKey and secretKey set correctly)
returns
mcli: <ERROR> Unable to get help for the sub-system: unknown sub-system MINIO_BROWSER_REDIRECT_URL.....
I can get expected returns running e.g.
mcli admin info local-s3
mcli ls local-s3
The same happens when using mc
mcli is from https://dl.min.io/client/mc/release/linux-amd64/mc.deb
mc is from https://dl.min.io/client/mc/release/linux-amd64/mc
What's the correct way to set with mcli/mc?
mcli admin config set local-s3 MINIO_BROWSER_REDIRECT_URL https://my.domain.com/s3/ORmcli admin config set local-s3 MINIO_BROWSER_REDIRECT_URL="https://my.domain.com/s3/"ORmcli admin config set local-s3 MINIO_BROWSER_REDIRECT_URL=https://my.domain.com/s3/on my server (as known aslocal-s3in the config.json withaccessKeyandsecretKeyset correctly) returnsmcli: <ERROR> Unable to get help for the sub-system: unknown sub-system MINIO_BROWSER_REDIRECT_URL.....
You cannot set MINIO_BROWSER_REDIRECT_URL values via mc you need to use export the value before you start MinIO for it to be actionable.
Since it looks like hijacking the actual conversation. Will mark this as outoftopic for now.
I came across a similar situation. In my case, adding a trailing slash to the MINIO_BROWSER_REDIRECT_URL variable does not give any result. A URL without a trailing slash returns a blank page.
MINIO_VERSION: minio:ICE-3-5-550-RELEASE.2024-01-11T07-46-16Z
MINIO_BROWSER_REDIRECT_URL: http://localhost/minio
Here is Nginx location conf:
location ~* "^/minio(/|$)(.*)" {
...
rewrite "(?i)/minio(/|$)(.*)" /$2 break;
proxy_pass http://upstream_balancer;
...
}
Workaround - Adding the trailing / to the URL (http://192.168.0.193/minio/)
Same issue I cannot get minio to work in a subpath, i just get a balnk page for the main request, the other requests seem to return the intended result