Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-09-22 11:37:19 +0300
committerFilipa Lacerda <filipa@gitlab.com>2017-09-22 11:37:19 +0300
commit07b0d933b523b22464c72e0dd85bc413f455b72f (patch)
treee70464a937516169b1fdff89a0c1518236ce5bf8 /app/assets/javascripts/vue_shared
parent8ba9c2bd6d10c74529a0e2e6bb894c34614966f1 (diff)
parentd103e95513704314a38ab8ae441851524031c4a1 (diff)
Merge branch 'master' into 31050-registry-image-lists
* master: (112 commits) Replace the 'project/service.feature' spinach test with an rspec analog Removed two legacy config options Fix rendering double note issue. IssueNotes: Switch back to Write pane when note cancel or submit. Upgrade Nokogiri because of CVE-2017-9050 Bump VERSION to 10.1.0-pre Standardize access to CSRF token in JavaScript Do not clone the repo when running the review-docs jobs Don't memoize storage configuration on `FsShardsCheck` Document that group Owners can always create subgroups Auto DevOps docs cleanup Display full pre-receive and post-receive hook output in GitLab UI Adds EE tag detection to remove_old in gitlab backup. Correctly detect multiple issue URLs after 'Closes...' in MR descriptions new sharing permissions IssueNotes: Resize comment form after note submit and discard. [skip ci] Add changelog Make resolve discussion icon gray update spacing Deleted another Fixture due to User Callout ...
Diffstat (limited to 'app/assets/javascripts/vue_shared')
-rw-r--r--app/assets/javascripts/vue_shared/vue_resource_interceptor.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/assets/javascripts/vue_shared/vue_resource_interceptor.js b/app/assets/javascripts/vue_shared/vue_resource_interceptor.js
index 7f8e514fda1..b9693892f45 100644
--- a/app/assets/javascripts/vue_shared/vue_resource_interceptor.js
+++ b/app/assets/javascripts/vue_shared/vue_resource_interceptor.js
@@ -1,5 +1,6 @@
import Vue from 'vue';
import VueResource from 'vue-resource';
+import csrf from '../lib/utils/csrf';
Vue.use(VueResource);
@@ -18,9 +19,7 @@ Vue.http.interceptors.push((request, next) => {
// New Vue Resource version uses Headers, we are expecting a plain object to render pagination
// and polling.
Vue.http.interceptors.push((request, next) => {
- if ($.rails) {
- request.headers.set('X-CSRF-Token', $.rails.csrfToken());
- }
+ request.headers.set(csrf.headerKey, csrf.token);
next((response) => {
// Headers object has a `forEach` property that iterates through all values.