Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using MINIO_BROWSER_REDIRECT_URL without a / suffix results in a white page #3009

Open
hashworks opened this issue Aug 22, 2023 · 7 comments
Assignees
Labels
community enhancement New feature or request

Comments

@hashworks
Copy link

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

  1. Run Minio with MINIO_SERVER_URL="https://minio.example.net" and MINIO_BROWSER_REDIRECT_URL="https://minio.example.net/ui"
  2. Use a nginx reverse proxy as specified in the docs
  3. Open https://minio.example.net in a browser
  4. Notice the redirect to https://minio.example.net/ui and the white page
  5. Change MINIO_BROWSER_REDIRECT_URL to https://minio.example.net/ui/, restart Minio
  6. Open https://minio.example.net in a browser
  7. 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
@hashworks hashworks changed the title Using a MINIO_BROWSER_REDIRECT_URL without a / suffix results in an empty page Using MINIO_BROWSER_REDIRECT_URL without a / suffix results in an empty page Aug 22, 2023
@hashworks hashworks changed the title Using MINIO_BROWSER_REDIRECT_URL without a / suffix results in an empty page Using MINIO_BROWSER_REDIRECT_URL without a / suffix results in a white page Aug 22, 2023
@harshavardhana harshavardhana transferred this issue from minio/minio Aug 22, 2023
@cesnietor cesnietor added enhancement New feature or request and removed triage labels Aug 28, 2023
@cesnietor cesnietor assigned cesnietor and dvaldivia and unassigned cesnietor Aug 28, 2023
@cesnietor
Copy link
Collaborator

cesnietor commented Sep 11, 2023

we'll test if it works with nginx cause it seems it works without it.

@hashworks
Copy link
Author

hashworks commented Sep 11, 2023 via email

@cesnietor
Copy link
Collaborator

cesnietor commented Sep 11, 2023

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 :)

@wxrl

This comment was marked as off-topic.

@harshavardhana

This comment was marked as resolved.

@Subetov
Copy link

Subetov commented Jan 19, 2024

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.

image
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/)

@ThisIsANiceName
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants