Skip to content

Commit

Permalink
Make default application/octet-stream and include text/plain mime type
Browse files Browse the repository at this point in the history
  • Loading branch information
andycaine committed Jun 27, 2024
1 parent a6728c6 commit 26161b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sad/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ def content_type(file_name):
'.css': 'text/css',
'.js': 'application/javascript',
'.xml': 'application/xml',
'.txt': 'text/plain',
'.png': 'image/png',
}
_, ext = os.path.splitext(file_name)
return mime_types.get(ext, 'binary/octet-stream')
return mime_types.get(ext, 'application/octet-stream')


def handler(event, context):
Expand Down
2 changes: 1 addition & 1 deletion template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Metadata:
ReadmeUrl: README.md
Labels: ['cloudformation', 's3', 'python']
HomePageUrl: https://github.com/andycaine/static-assets-deployment#readme
SemanticVersion: 0.3.5
SemanticVersion: 0.3.6
SourceCodeUrl: https://github.com/andycaine/static-assets-deployment
Resources:

Expand Down

0 comments on commit 26161b6

Please sign in to comment.