mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 04:21:42 +00:00
parent
9dee10bcb9
commit
13561a5f71
1 changed files with 8 additions and 1 deletions
|
@ -6,6 +6,9 @@ module Api
|
|||
class CspReportsController < BaseController
|
||||
skip_forgery_protection
|
||||
|
||||
# No queremos indicar que algo salió mal
|
||||
rescue_from ActionController::ParameterMissing, with: :csp_report_created
|
||||
|
||||
# Crea un reporte de CSP intercambiando los guiones medios por
|
||||
# bajos
|
||||
#
|
||||
|
@ -18,7 +21,7 @@ module Api
|
|||
csp.id = SecureRandom.uuid
|
||||
csp.save
|
||||
|
||||
render json: {}, status: :created
|
||||
csp_report_created
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -39,6 +42,10 @@ module Api
|
|||
:'column-number',
|
||||
:'source-file')
|
||||
end
|
||||
|
||||
def csp_report_created
|
||||
render json: {}, status: :created
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue