Ntfy: anonymise token if url points to ntfy.sh
This commit is contained in:
parent
1f689bfb59
commit
1ae60cd823
1 changed files with 6 additions and 1 deletions
|
|
@ -37,8 +37,13 @@ func NewNtfyFromConfig(other map[string]interface{}) (Messenger, error) {
|
|||
return nil, errors.New("missing uri")
|
||||
}
|
||||
|
||||
log := util.NewLogger("ntfy")
|
||||
if token, ok := strings.CutPrefix(cc.URI, "https://ntfy.sh/"); ok {
|
||||
log = log.Redact(token)
|
||||
}
|
||||
|
||||
m := &Ntfy{
|
||||
log: util.NewLogger("ntfy"),
|
||||
log: log,
|
||||
uri: cc.URI,
|
||||
priority: cc.Priority,
|
||||
tags: cc.Tags,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue