TsgcWSAPIServer_WebPush › Properties › Server
WebSocket/HTTP server this API component is attached to; its HTTP listener is used to serve the Web Push endpoints (subscription, service worker, VAPID public key).
property Server: TsgcWSComponent_Server read FServer write SetServer;
—
Assign a TsgcWebSocketHTTPServer (or any TsgcWSComponent_Server descendant) so the API component can hook its HTTP pipeline and respond to the routes defined in WebPush.Endpoints. Once attached, browser clients can GET the home page, load the Web Push javascript and service worker, POST subscription/unsubscription JSON payloads, and download the VAPID public key. All traffic travels through the server's existing ports, TLS and authentication stack, so no extra listener is created.
sgcWSAPIServer_WebPush1.Server := sgcWebSocketHTTPServer1;
sgcWebSocketHTTPServer1.Port := 443;
sgcWebSocketHTTPServer1.Active := True;