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:
Diffstat (limited to 'app/controllers/jira_connect/cors_preflight_checks_controller.rb')
-rw-r--r--app/controllers/jira_connect/cors_preflight_checks_controller.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/controllers/jira_connect/cors_preflight_checks_controller.rb b/app/controllers/jira_connect/cors_preflight_checks_controller.rb
new file mode 100644
index 00000000000..3f30c1e04df
--- /dev/null
+++ b/app/controllers/jira_connect/cors_preflight_checks_controller.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+module JiraConnect
+ class CorsPreflightChecksController < ApplicationController
+ feature_category :integrations
+
+ skip_before_action :verify_atlassian_jwt!
+ before_action :set_cors_headers
+
+ def index
+ return render_404 unless allow_cors_request?
+
+ render plain: '', content_type: 'text/plain'
+ end
+ end
+end