summaryrefslogtreecommitdiff
path: root/changelogs
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-05-13 21:43:48 -0700
committerStan Hu <stanhu@gmail.com>2018-05-13 21:49:51 -0700
commit0c43170630b5b4e90e8f91526066435a06e077eb (patch)
tree856916a4bfd52a3fba1ca3bddf6c9c4a21091bdc /changelogs
parent40683268b2b5ad807194387d8345a30195e178c4 (diff)
downloadgitlab-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.yml5
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