SherClockHolmes / webpush-go

Web Push API Encryption with VAPID support.
MIT License
312 stars 67 forks source link

Option to skip padding #35

Closed vikramj74 closed 4 years ago

vikramj74 commented 4 years ago

I tested this library on a different browsers and observed that firefox mobile is not able to handle a payload of standard 4KB size. To work around this problem, I disabled the padding in the source code. I would appreciate it if there was a way to turn off the padding option, for such cases.

SherClockHolmes commented 4 years ago

Hey @vikramj74,

There isn't an option to skip padding, but you can limit the size of the record for Firefox mobile in the Options struct: https://github.com/SherClockHolmes/webpush-go/blob/master/webpush.go#L42

decademoon commented 2 years ago

Is the padding necessary?