andersundsehr / aus_driver_amazon_s3

Provides a TYPO3 FAL driver for the Amazon Web Service S3
GNU Lesser General Public License v3.0
20 stars 39 forks source link

MIME type of .js file: text/plain #85

Open cweiske opened 2 years ago

cweiske commented 2 years ago

When uploading a javascript file with .js extension, it gets uploaded with mime type "text/plain".

This leads to problems because browsers reject .js files with the wrong mime type if the HTTP header x-content-type-options: nosniff is set.

I doubt that the magic file database will ever correctly detect the mime type of a javascript file, because there are no stable markers it could use. This driver here should cater for that problem, and manually fix the type.

Related to #84.

cweiske commented 2 years ago

MinIO automatically adds this header now: https://github.com/minio/minio/pull/12256