RSS Amplifier

Recent Questions - Software Engineering Stack Exchange · Jul 28, 2026

Best practice for serving private S3-compatible bucket files to browsers when presigned URLs contain internal Docker hostnames?

0
Sign in to vote or save

This page did not load. You can still read it on the original site — the toolbar below keeps your place in the directory.

We have a NestJS backend generating presigned GET/POST URLs for a private bucket on MinIO (S3-compatible). The S3 client is configured with the internal Docker service name as endpoint (e.g., http://minio:9000 ), so presigned URLs contain that internal hostname, the browser can't resolve it. Currently we work around this with a server-side proxy: the frontend (Nuxt) fetches presigned URLs from the…

We have a NestJS backend generating presigned GET/POST URLs for a private bucket on MinIO (S3-compatible). The S3 client is configured with the internal Docker service name as endpoint (e.g., http://minio:9000), so presigned URLs contain that internal hostname, the browser can't resolve it.

Currently we work around this with a server-side proxy: the frontend (Nuxt) fetches presigned URLs from the backend, then proxies the actual file requests through a Nuxt server route (/api/private-file?url=<presigned_url>) which rewrites the host to a public address.

Is this proxy approach an anti-pattern? What's the standard way to handle this? Options I'm considering:

  1. Configure the backend with a separate STORAGE_PUBLIC_ENDPOINT so presigned URLs are generated with a browser-reachable hostname (while the S3 client still connects via internal endpoint)
  2. Put a reverse proxy (Nginx) in front of MinIO with a consistent hostname resolvable both internally and externally
  3. Accept the server-side proxy as-is

What do most production setups do?

Read on softwareengineering.stackexchange.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.