Comfy-Org / Comfy-Org/ComfyUI

[DevTask] Configure Content-Disposition on downloaded files

Open
#8,393 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

Currently we rely on the security convention that browsers will not attempt to run binary files, and change their MIME type to binary.

Recommendation is to actually instruct the browser to download files by setting`Content-Disposition` properly.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Disposition#syntax

```
Content-Disposition: attachment; filename="download-me.html"
```

https://github.com/comfyanonymous/ComfyUI/blob/312d511630db4907c3bed04dee297b28f61941a8/server.py#L485-L488

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.