What Operating System are you using (both controller, and any agents involved in the problem)?
not important
Reproduction steps
Take a valid HTML, JavaScript, whatever file
Upload it to your MinIO instance via the MinIO plugin in your Jenkins job
Try to call the object's fqdn (e.g. access the HTML file in browser)
Results
Expected result:
I expected to get the file delivered as HTML and view it in my browser.
Actual result:
The content-type of the object gets hardcoded here. This leads to the browser thinking its a download, which will prevent you from viewing the object as a HTML page.
Also, normally browsers look into octet-stream files and look what they can do with it, but MinIO server sets X-Content-Type-Options: nosniff on objects per default which is a good security feature.
I guess the above mentioned code line should be changed, thus the plugin no longer uploads objects with a hard-coded content-type. Maybe a similar approach to the mc CLI is possible, which does add at least some logic to setting the content-type.
As always, thanks for keeping up the project and providing us a Jenkins plugin! :smile:
Version report
Jenkins and plugins versions report:
Reproduction steps
Results
Expected result:
I expected to get the file delivered as HTML and view it in my browser.
Actual result:
The
content-type
of the object gets hardcoded here. This leads to the browser thinking its a download, which will prevent you from viewing the object as a HTML page.Also, normally browsers look into octet-stream files and look what they can do with it, but MinIO server sets
X-Content-Type-Options: nosniff
on objects per default which is a good security feature.I guess the above mentioned code line should be changed, thus the plugin no longer uploads objects with a hard-coded
content-type
. Maybe a similar approach to themc
CLI is possible, which does add at least some logic to setting thecontent-type
.As always, thanks for keeping up the project and providing us a Jenkins plugin! :smile: