Skip to content

fix: make readeckobo work behind non-nginx reverse proxies - #3

Open
shaunmbg wants to merge 1 commit into
eleith:mainfrom
shaunmbg:fix/non-nginx-reverse-proxy-support
Open

fix: make readeckobo work behind non-nginx reverse proxies#3
shaunmbg wants to merge 1 commit into
eleith:mainfrom
shaunmbg:fix/non-nginx-reverse-proxy-support

Conversation

@shaunmbg

Copy link
Copy Markdown
  • Set correct Host header and strip path prefix in HandleDumpAndForward so storeapi.kobo.com accepts requests (fixes 403/404 errors)
  • Decompress gzip response before rewriting initialization URL, then recompress (fixes silent rewrite failure)
  • Register catch-all route for /instapaper-proxy/storeapi/ so auth refresh and other storeapi routes are proxied correctly
  • Register routes for /instapaper-proxy/instapaper/ prefix so Kobo can reach the Instapaper API endpoints without nginx path stripping
  • Sanitize semicolons in download request body before form parsing to handle tracking URLs (Go 1.17+ rejects semicolons in query strings)
  • Use status 2 (deleted) instead of 1 (archived) in incremental sync so archived articles are removed from the Kobo's My Articles list

- Set correct Host header and strip path prefix in HandleDumpAndForward
  so storeapi.kobo.com accepts requests (fixes 403/404 errors)
- Decompress gzip response before rewriting initialization URL,
  then recompress (fixes silent rewrite failure)
- Register catch-all route for /instapaper-proxy/storeapi/ so auth
  refresh and other storeapi routes are proxied correctly
- Register routes for /instapaper-proxy/instapaper/ prefix so Kobo
  can reach the Instapaper API endpoints without nginx path stripping
- Sanitize semicolons in download request body before form parsing
  to handle tracking URLs (Go 1.17+ rejects semicolons in query strings)
- Use status 2 (deleted) instead of 1 (archived) in incremental sync
  so archived articles are removed from the Kobo's My Articles list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant