Skip to content

Commit

Permalink
fix: use correct mimetypes for .pem and .pub (#1891)
Browse files Browse the repository at this point in the history
This changes the .pem mimetype to application/x-pem-file. It also
changes the .pub mimetype to text/plain. Lastly, it updates
textApplicationMimetypes with this change.
  • Loading branch information
oneirocosm authored Jan 31, 2025
1 parent 2cae9ba commit 750e260
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/app/view/preview/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ const SpecializedViewMap: { [view: string]: ({ model }: SpecializedViewProps) =>

const textApplicationMimetypes = [
"application/sql",
"application/pem-certificate-chain",
"application/x-php",
"application/x-pem-file",
"application/x-httpd-php",
"application/liquid",
"application/graphql",
Expand Down
4 changes: 2 additions & 2 deletions pkg/util/fileutil/mimetypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ var StaticMimeTypeMap = map[string]string{
".relo": "application/p2p-overlay+xml",
".pdf": "application/pdf",
".pdx": "application/PDX",
".pem": "application/pem-certificate-chain",
".pgp": "application/pgp-encrypted",
".asc": "application/pgp-keys",
".sig": "application/pgp-signature",
Expand Down Expand Up @@ -351,7 +350,6 @@ var StaticMimeTypeMap = map[string]string{
".ecig": "application/vnd.evolv.ecig.settings",
".ecigtheme": "application/vnd.evolv.ecig.theme",
".mpw": "application/vnd.exstream-empower+zip",
".pub": "application/vnd.exstream-package",
".ez2": "application/vnd.ezpix-album",
".ez3": "application/vnd.ezpix-package",
".gdz": "application/vnd.familysearch.gedcom+zip",
Expand Down Expand Up @@ -769,6 +767,7 @@ var StaticMimeTypeMap = map[string]string{
".gtar": "application/x-gtar",
".tgz": "application/x-gtar-compressed",
".hdf": "application/x-hdf",
".pem": "application/x-pem-file",
".php": "application/x-php",
".hwp": "application/x-hwp",
".ica": "application/x-ica",
Expand Down Expand Up @@ -1116,6 +1115,7 @@ var StaticMimeTypeMap = map[string]string{
".n3": "text/n3",
".txt": "text/plain",
".conf": "text/plain",
".pub": "text/plain",
".awk": "text/x-awk",
".provn": "text/provenance-notation",
".rst": "text/prs.fallenstein.rst",
Expand Down

0 comments on commit 750e260

Please sign in to comment.