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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-09 00:09:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-09 00:09:48 +0300
commit59e6c2df22c69baa791529db3326e68c9de10b54 (patch)
treeaa75309a037a6031c38f8ccd9afe53cbcd519355 /app/helpers/startupjs_helper.rb
parente7527f548681e4f9efd32f9c3da937ad74c68948 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/startupjs_helper.rb')
-rw-r--r--app/helpers/startupjs_helper.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/startupjs_helper.rb b/app/helpers/startupjs_helper.rb
index b595590c7c9..2e8f0cb7dbe 100644
--- a/app/helpers/startupjs_helper.rb
+++ b/app/helpers/startupjs_helper.rb
@@ -5,6 +5,13 @@ module StartupjsHelper
@graphql_startup_calls
end
+ def page_startup_graphql_headers
+ {
+ 'X-CSRF-Token' => form_authenticity_token,
+ 'x-gitlab-feature-category' => ::Gitlab::ApplicationContext.current_context_attribute(:feature_category).presence || ''
+ }
+ end
+
def add_page_startup_graphql_call(query, variables = {})
@graphql_startup_calls ||= []
file_location = File.join(Rails.root, "app/graphql/queries/#{query}.query.graphql")