-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add JavaScript error report #22
Conversation
Signed-off-by: Christoph Wurst <[email protected]>
Signed-off-by: Christoph Wurst <[email protected]>
Wouldn't it be easiest to just have a simple controller that just proxies the stuff to sentry? That way you get around the CSP ;) |
Else you can of course when this app is enabled just add a policy to the CSP see https://github.com/nextcloud/files_texteditor/blob/master/appinfo/app.php#L14 |
I think there's a lot of dark magic in the Sentry client to gather lots of information about the error and the browser for the report. I'd have to implement all that by myself. |
Ah the just extend the CSP when this app is enabled ;) |
Will do, thanks for the tip! |
…nto feature/javascript-error-report Signed-off-by: Christoph Wurst <[email protected]>
Signed-off-by: Christoph Wurst <[email protected]>
Signed-off-by: Christoph Wurst <[email protected]>
CSP is fixed now. @rullzer @georgehrke @MorrisJobke give this a quick review please :) |
Signed-off-by: Christoph Wurst <[email protected]>
* @NoCSRFRequired | ||
*/ | ||
public function dsn(): Response { | ||
$pubDsn = $this->config->getSystemValue('sentry.public-dsn', null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be documented in the readme and maybe also add a link to https://docs.sentry.io/clients/javascript/usage/#preventing-abuse there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I fixed it in the latest commit.
Signed-off-by: Christoph Wurst <[email protected]>
Signed-off-by: Christoph Wurst <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code makes sense - haven't tested
Fixes #20
Todo:
cc @georgehrke