Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: page cover fetching - follow redirects #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cornzz
Copy link

@cornzz cornzz commented Oct 8, 2024

Fixes #40

Page rendering broke because the NodeHttpGetClient.get function could not handle redirects. Since notion seems to have changed the domain of their user content servers, the package broke if trying to render a notion page that has a cover image.

This PR fixes the bug by checking if the status code of the response is a redirect and if so, recursively invoking get() again on the URL in the location header.

@asnunes

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content Fetch Broken ; Issue with JSON Parsing
1 participant