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
{{ message }}
Repository navigation
.txt.asc files are downloaded instead of displayed in browser #69
I believe this is because there's a difference in the content-type headers, nginx returns content-type: text/plain while R2 returns content-type: application/pgp-keys. The content type for each file is stored in R2's metadata, I don't believe we can update it after uploading but I could be wrong.
A simple fix would be to just check if it's a .asc file when constructing the serve file response and send a text/plain content type instead of whatever R2 has it as. We already do check if it's a .json file for CORS headers
Activity
flakey5 commentedon Nov 15, 2023
I believe this is because there's a difference in the
content-typeheaders, nginx returnscontent-type: text/plainwhile R2 returnscontent-type: application/pgp-keys. The content type for each file is stored in R2's metadata, I don't believe we can update it after uploading but I could be wrong.A simple fix would be to just check if it's a
.ascfile when constructing the serve file response and send atext/plaincontent type instead of whatever R2 has it as. We already do check if it's a.jsonfile for CORS headerstargos commentedon Nov 15, 2023
This one is probably not a big deal. I'm ok with just closing the issue.
ovflowd commentedon Nov 18, 2023
I also think this is not a big deal, just funny that R2 has a different content/type for this than nginx.