mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: graduate web-push from experiment to always-on (#24310)
* Removes experiment `web-push`.
* Falls back to NoopWebpusher in case of error
* Checks browser capability in FE
* Adds note to agents getting-started docs regarding webpush without TLS
> 🤖
This commit is contained in:
@@ -386,9 +386,11 @@ func (n *Webpusher) PublicKey() string {
|
||||
return n.VAPIDPublicKey
|
||||
}
|
||||
|
||||
// NoopWebpusher is a Dispatcher that does nothing except return an error.
|
||||
// This is returned when web push notifications are disabled, or if there was an
|
||||
// error generating the VAPID keys.
|
||||
// NoopWebpusher is a Dispatcher that always fails, returning Msg as
|
||||
// the error. It is used as a fallback when VAPID key setup fails.
|
||||
// The underlying error is not included to avoid leaking internal
|
||||
// details (e.g. database errors) in API responses; it is logged at
|
||||
// the call site instead.
|
||||
type NoopWebpusher struct {
|
||||
Msg string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user