Fix Pocket integration redirect URL and Google Reader API HREF.

This commit is contained in:
Cp Dong 2023-08-24 09:20:54 +08:00 committed by Frédéric Guillot
parent bea9017b48
commit fa1148915e
2 changed files with 2 additions and 2 deletions

View file

@ -815,7 +815,7 @@ func (h *handler) streamItemContents(w http.ResponseWriter, r *http.Request) {
Updated: time.Now().Unix(), Updated: time.Now().Unix(),
Self: []contentHREF{ Self: []contentHREF{
{ {
HREF: config.Opts.BaseURL() + route.Path(h.router, "StreamItemsContents"), HREF: config.Opts.RootURL() + route.Path(h.router, "StreamItemsContents"),
}, },
}, },
Author: user.Username, Author: user.Username,

View file

@ -32,7 +32,7 @@ func (h *handler) pocketAuthorize(w http.ResponseWriter, r *http.Request) {
sess := session.New(h.store, request.SessionID(r)) sess := session.New(h.store, request.SessionID(r))
connector := pocket.NewConnector(config.Opts.PocketConsumerKey(integration.PocketConsumerKey)) 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) requestToken, err := connector.RequestToken(redirectURL)
if err != nil { if err != nil {
logger.Error("[Pocket:Authorize] %v", err) logger.Error("[Pocket:Authorize] %v", err)