Skip to content

Commit ced6173

Browse files
goaroundjoostdebruijn
authored andcommitted
Update WebPushServiceProvider.php
1 parent b627c01 commit ced6173

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/WebPushServiceProvider.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ public function boot(): void
2525
{
2626
$this->app->when(WebPushChannel::class)
2727
->needs(WebPush::class)
28-
->give(fn (): WebPush => (new WebPush(
29-
$this->webPushAuth(), [], 30, config('webpush.client_options', [])
30-
))->setReuseVAPIDHeaders(true));
28+
->give(function () {
29+
return (new WebPush(
30+
$this->webPushAuth(), [], 30, config('webpush.client_options', [])
31+
))
32+
->setReuseVAPIDHeaders(true)
33+
->setAutomaticPadding(config('webpush.automatic_padding', 4078));
34+
});
3135

3236
$this->app->when(WebPushChannel::class)
3337
->needs(ReportHandlerInterface::class)

0 commit comments

Comments
 (0)