diff options
author | Stan Hu <stanhu@gmail.com> | 2018-05-13 21:43:48 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-05-13 21:49:51 -0700 |
commit | 0c43170630b5b4e90e8f91526066435a06e077eb (patch) | |
tree | 856916a4bfd52a3fba1ca3bddf6c9c4a21091bdc /changelogs | |
parent | 40683268b2b5ad807194387d8345a30195e178c4 (diff) | |
download | gitlab-ce-0c43170630b5b4e90e8f91526066435a06e077eb.tar.gz |
Fix cross-origin errors when attempting to download JavaScript attachments
If you upload a file with a .js extension, Rails' cross-origin JavaScript
protection will prevent a user from downloading the file with a 422 error.
Setting the content-type to `text/plain` will allow the user to download
the file as a plaintext file.
Closes #45826
Diffstat (limited to 'changelogs')
-rw-r--r-- | changelogs/unreleased/sh-fix-cross-site-origin-uploads-js.yml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/changelogs/unreleased/sh-fix-cross-site-origin-uploads-js.yml b/changelogs/unreleased/sh-fix-cross-site-origin-uploads-js.yml new file mode 100644 index 00000000000..3c51aaae896 --- /dev/null +++ b/changelogs/unreleased/sh-fix-cross-site-origin-uploads-js.yml @@ -0,0 +1,5 @@ +--- +title: Fix cross-origin errors when attempting to download JavaScript attachments +merge_request: +author: +type: fixed |