3 ms·
What would bother you about exposing the bucket? There's no immediate security hole, but I'd still be wary about exposing the bucket name, directory name and o
by iainmerrick 2y ago
What would bother you about exposing the bucket?
There's no immediate security hole, but I'd still be wary about exposing the bucket name, directory name and object name unnecessarily. Those might have a direct correspondence with the original public URL, but they might not. Maybe the object name is a database ID and the same ID gets used elsewhere for some other purpose. Who knows? Why take the chance if you don't need to?
I'd prefer an API like this where it's explicit
That's the thing, in the previous section it already described the "s3.presign()" function. If you want to redirect to a presigned URL, you already have everything you need, no magic required.
- steve_adams_86 2y agoI missed the presign method. It would be very concise to be explicit here. The more I look at recent bun developments the more it seems like they’re shooting for magic rather than intelligent design. It’s clearly impressive stuff and I’m glad they’re doing what they’re doing, but stuff like this makes it so I’m hesitant to commit to the runtime APIs.