我得到一个
我的Rails应用出现{"code": 401, "errno": 109, "error": "Unauthorized", "more_info": "http://autopush.readthedocs.io/en/latest/http.html#error-codes", "message": "Request did not validate missing authorization header"}
错误。但是直到昨天为止一切都很好...
这是payload_send
Webpush.payload_send(
endpoint: s[:endpoint],
p256dh: s[:p256dh],
auth: s[:auth],
vapid: {
subject: vapid_keys[:subject],
public_key: vapid_keys[:public_key],
private_key: vapid_keys[:private_key]
}
)
所有必需的参数肯定都已完全填写。
我正在将此webpush库用于Rails https://github.com/zaru/webpush