velsa / notehost

Free Hosting for Notion Sites!
MIT License
87 stars 8 forks source link

Hitting the refresh button causes "NoteHost: Page Not found (404)." #22

Closed stanimirpehlivanov closed 4 months ago

stanimirpehlivanov commented 5 months ago

Hitting the refresh button on any sub-page causes "NoteHost: Page Not found (404)."

Steps to reproduce:

  1. Setup Notehost with a single slugToPage which points to the notion page ID of the home page and deploy.
  2. Embed a second page on that home page. Let's call it page "X"
  3. Open your page via the domain and then follow the link to navigate to page "X". Should load ok.
  4. Press refresh button. This is where I see "NoteHost: Page Not found (404)." and this replicates consistently.

Any idea how to resolve this?

velsa commented 5 months ago

I am a bit confused. If you don't have a slug to page defined for a specific route, the default behavior is to show the 404 page. What do you expect should happen?

stanimirpehlivanov commented 5 months ago

Let me clarify. This is a notion page that is accessible and loads correctly on first load via a link on the root. The specific problem occurs only after hitting the refresh button on an already loaded page.

Steps to reproduce:

  1. Setup Notehost with a single slugToPage which points to the notion page ID of the home page and deploy.
  2. Embed a second page on that home page. Let's call it page "X"
  3. Open your page via the domain and then follow the link to navigate to page "X". Should load ok.
  4. Press refresh button. This is where I see "NoteHost: Page Not found (404)." and this replicates consistently.
velsa commented 5 months ago

I've made a few changes that should address this issue.

Can you please test it with the latest version of notehost?