mirror of
https://0xacab.org/sutty/sutty
synced 2025-01-19 08:33:38 +00:00
fix: especificar qué parametros de airbrake permitimos #14956
This commit is contained in:
parent
399d904f9e
commit
c22276f74f
1 changed files with 35 additions and 3 deletions
|
@ -23,7 +23,39 @@ module Api
|
||||||
# XXX: Por alguna razón Airbrake envía los datos con Content-Type:
|
# XXX: Por alguna razón Airbrake envía los datos con Content-Type:
|
||||||
# text/plain.
|
# text/plain.
|
||||||
def airbrake_params
|
def airbrake_params
|
||||||
@airbrake_params ||= params.merge!(FastJsonparser.parse(request.raw_post) || {}).permit!
|
@airbrake_params ||=
|
||||||
|
params.merge!(FastJsonparser.parse(request.raw_post) || {})
|
||||||
|
.permit(
|
||||||
|
{
|
||||||
|
errors: [
|
||||||
|
:type,
|
||||||
|
:message,
|
||||||
|
{ backtrace: %i[file line column function] }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
context: [
|
||||||
|
:url,
|
||||||
|
:language,
|
||||||
|
:severity,
|
||||||
|
:userAgent,
|
||||||
|
:windowError,
|
||||||
|
:rootDirectory,
|
||||||
|
{
|
||||||
|
history: [
|
||||||
|
:date,
|
||||||
|
:type,
|
||||||
|
:severity,
|
||||||
|
:target,
|
||||||
|
:method,
|
||||||
|
:duration,
|
||||||
|
:statusCode,
|
||||||
|
{ arguments: [] }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def site
|
def site
|
||||||
|
|
Loading…
Reference in a new issue