You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use the S3 adapter provided by the gem, after uploading the file ("sitemap.xml.gz"), when I provide the URL to a sitemap validator (like xml-sitemaps.com/validate-xml-sitemap.html ), there is an error, because the request returns an unexpected content media type: "application/gzip".
This happens because the raw S3 upload does not declare the media type, and this is inferred (either by S3 or fog). I've patched the adapter's write method locally so I could have access to the fog API that allows me to set these:
After uploading with this patch, the sitemap link could be validated.
I'd like to propose either passing headers as a supported option, or to apply these changes to the adapter, depending of whether compression is on or off (for "content-encoding").
The text was updated successfully, but these errors were encountered:
I'm running into this same issue with Cloudflare R2 which uses the S3 adapter. My sitemap files have the application/x-gzip content-type which seems to confuse Google.
Would you mind making a PR of your suggested change? I think more people would benefit from it.
If I use the S3 adapter provided by the gem, after uploading the file ("sitemap.xml.gz"), when I provide the URL to a sitemap validator (like xml-sitemaps.com/validate-xml-sitemap.html ), there is an error, because the request returns an unexpected content media type: "application/gzip".
This happens because the raw S3 upload does not declare the media type, and this is inferred (either by S3 or fog). I've patched the adapter's
write
method locally so I could have access to the fog API that allows me to set these:After uploading with this patch, the sitemap link could be validated.
I'd like to propose either passing headers as a supported option, or to apply these changes to the adapter, depending of whether compression is on or off (for "content-encoding").
The text was updated successfully, but these errors were encountered: