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

Do I need to use mitm? #341

Open
ZainChenDev opened this issue Apr 9, 2024 · 0 comments
Open

Do I need to use mitm? #341

ZainChenDev opened this issue Apr 9, 2024 · 0 comments

Comments

@ZainChenDev
Copy link

I've recently been trying to use Streamsaver.js to transfer file streams from my own server to the frontend browser. I've successfully set the Content-Disposition and Content-Type, where Content-Type is determined to be application/octet-stream.
this is my code on my (springboot) server:

public void getMinioObject(String bucket, String objectKey, HttpServletResponse response)  {
    StatObjectResponse stat = minioClient.statObject(
        StatObjectArgs.builder()
            .bucket(bucket)
            .object(objectKey)
            .build()
    );
    response.setContentType(stat.contentType());
    response.setCharacterEncoding("UTF-8");
    response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(objectKey, "UTF-8"));

    InputStream is = minioClient.getObject(GetObjectArgs.builder().bucket(bucket).object(objectKey).build());
    IOUtils.copy(is, response.getOutputStream());
    is.close();
}

I would like to know if it's still necessary to use mitm?
Now I have my own MitM installed on my server, but a popup appears when downloading files. I'm not sure if I need to use MitM and how to close this popup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant