fastly / pushpin

A proxy server for adding push to your API, used at the core of Fastly's Fanout service
https://pushpin.org
Apache License 2.0
3.66k stars 153 forks source link

add support for gone links #48067

Closed jkarneges closed 2 months ago

jkarneges commented 2 months ago

This introduces a way to send notifications when HTTP subscribers disconnect. Backends can supply a gone link in a response header:

Grip-Hold: stream
Grip-Channel: foo
Grip-Link: </disconnect/1234>; rel=gone

When the client disconnects for any reason, Pushpin will make a POST request to the specified URL with an empty body. It will expect an empty response. The notification is best-effort: if the request fails for any reason, it will not be retried. It is also not guaranteed to occur, for example if Pushpin is shut down while clients are connected.