static-html-output icon indicating copy to clipboard operation
static-html-output copied to clipboard

Can I change the content-type of files deployed on s3

Open ichiragshah opened this issue 5 years ago • 1 comments

I want to change the content-type of sitemap.xml to text/xml. By default, it goes application/octet-stream and get downloaded. Screenshot 2020-07-23 at 12 45 05 PM

How can I make sure it's always text/xml?

ichiragshah avatar Jul 23 '20 07:07 ichiragshah

Looks like in MimeTypes.php, you need something like this around line 14:

$wp_mime_types['xml'] = 'text/xml; charset=UTF-8';

john-shaffer avatar Jul 23 '20 13:07 john-shaffer