From ae55224d11e2cd2847f605da117e990cc0049f53 Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Sun, 31 Oct 2021 15:12:23 +0100 Subject: [PATCH] Create circular references between backend and hubbackend --- cmd/eksterd/app.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/eksterd/app.go b/cmd/eksterd/app.go index c1b0b76..fcc5fc6 100644 --- a/cmd/eksterd/app.go +++ b/cmd/eksterd/app.go @@ -47,10 +47,14 @@ func NewApp(options AppOptions) (*App, error) { app.backend.AuthEnabled = options.AuthEnabled app.backend.baseURL = options.BaseURL + + // FIXME: circular app.backend.hubIncomingBackend.pool = options.pool app.backend.hubIncomingBackend.baseURL = options.BaseURL + app.backend.hubIncomingBackend.backend = app.backend app.hubBackend = &hubIncomingBackend{backend: app.backend, baseURL: options.BaseURL, pool: options.pool} + app.backend.hubIncomingBackend = *app.hubBackend http.Handle("/micropub", µpubHandler{ Backend: app.backend,