From fa1148915e1f3eb6ba79e9d7ca15b5c378684d7f Mon Sep 17 00:00:00 2001 From: Cp Dong Date: Thu, 24 Aug 2023 09:20:54 +0800 Subject: [PATCH] Fix Pocket integration redirect URL and Google Reader API HREF. --- internal/googlereader/handler.go | 2 +- internal/ui/integration_pocket.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/googlereader/handler.go b/internal/googlereader/handler.go index 214fd8845ef..d3c0dfcea1c 100644 --- a/internal/googlereader/handler.go +++ b/internal/googlereader/handler.go @@ -815,7 +815,7 @@ func (h *handler) streamItemContents(w http.ResponseWriter, r *http.Request) { Updated: time.Now().Unix(), Self: []contentHREF{ { - HREF: config.Opts.BaseURL() + route.Path(h.router, "StreamItemsContents"), + HREF: config.Opts.RootURL() + route.Path(h.router, "StreamItemsContents"), }, }, Author: user.Username, diff --git a/internal/ui/integration_pocket.go b/internal/ui/integration_pocket.go index 30c1e6bf041..752394f58b5 100644 --- a/internal/ui/integration_pocket.go +++ b/internal/ui/integration_pocket.go @@ -32,7 +32,7 @@ func (h *handler) pocketAuthorize(w http.ResponseWriter, r *http.Request) { sess := session.New(h.store, request.SessionID(r)) connector := pocket.NewConnector(config.Opts.PocketConsumerKey(integration.PocketConsumerKey)) - redirectURL := config.Opts.BaseURL() + route.Path(h.router, "pocketCallback") + redirectURL := config.Opts.RootURL() + route.Path(h.router, "pocketCallback") requestToken, err := connector.RequestToken(redirectURL) if err != nil { logger.Error("[Pocket:Authorize] %v", err)