about summary refs log tree commit diff
path: root/app/controllers/api/activitypub/notes_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/api/activitypub/notes_controller.rb')
-rw-r--r--app/controllers/api/activitypub/notes_controller.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/controllers/api/activitypub/notes_controller.rb b/app/controllers/api/activitypub/notes_controller.rb
new file mode 100644
index 000000000..722961ec6
--- /dev/null
+++ b/app/controllers/api/activitypub/notes_controller.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class Api::Activitypub::NotesController < ApiController
+  before_action :set_status
+
+  respond_to :activitystreams2
+
+  def show
+    headers['Access-Control-Allow-Origin'] = '*'
+
+    forbidden unless @status.permitted?
+  end
+
+  private
+
+  def set_status
+    @status = Status.find(params[:id])
+  end
+end