Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix HTTP headers when downloading files (#2031)
#1796 introduced the usage of Laravel's `Storage::download()` helper, which forced the browser to download all files by default. This change was inconvenient for many users who wanted to view simple text files. This PR modifies the HTTP headers such that text files will be opened in the browser, and binary files will be downloaded in all major browsers. By setting the content-type to `text/plain`, the possibility of XSS attacks is mitigated. --------- Co-authored-by: Zack Galbreath <[email protected]>
- Loading branch information