Skip to content

Commit

Permalink
Add missing sentry settings to readme Sentry configuration part
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis Fortunier committed Apr 23, 2024
1 parent b655731 commit ecd9475
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ CHANGELOG for 1.x
## v1.2.5 - (2024-04-22)
### Added
- Adding scripts to the list of scripts that can be executed in `script-src` Nelmio Security recommendations config.
- Add missing sentry settings to readme Sentry configuration part

## v1.2.4 - (2024-04-22)

Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,29 @@ services:
factory: [ '@Smart\CoreBundle\Sentry\SentryCallback', 'getBeforeSend' ]
```

Also declare the following in your `config/packages/monolog.yaml` :

```yaml
when@prod:
monolog:
handlers:
# other handlers
sentry:
type: service
id: Sentry\Monolog\Handler
```

And define the `Sentry\Monolog\Handler` service in your services.yaml :

```yaml
services:
# other services
Sentry\Monolog\Handler:
arguments:
$hub: '@Sentry\State\HubInterface'
$level: !php/const Monolog\Logger::ERROR
```

### Nelmio Security recommendations

We recommand to setup a Content Security Policy in addition to the config generated by the nelmio security recipe:
Expand Down

0 comments on commit ecd9475

Please sign in to comment.