Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore: fix 404 page #133

Merged
merged 1 commit into from
Jan 27, 2025
Merged

chore: fix 404 page #133

merged 1 commit into from
Jan 27, 2025

Conversation

alexandear
Copy link
Contributor

The PR fixes the display of the 404 page on GCP App Engine by modifying doc/app.yaml (I'm not 100% sure if this helps because I can't deploy it without GCP permissions). It also slightly modifies the style of the error page.

Before:

image

After:

image

Fixes #80

@alexandear alexandear requested a review from joerdav as a code owner January 27, 2025 13:02
@joerdav joerdav merged commit b105465 into joerdav:main Jan 27, 2025
3 checks passed
@alexandear
Copy link
Contributor Author

@joerdav, it looks like this PR doesn't fix the issue.

The 404 page https://xcfile.dev/404.html exists, but when I go to an unknown page like https://xcfile.dev/unknown, a standard Not Found message appears:

image

Could you take a look?

@alexandear alexandear deleted the chore/add-404 branch January 27, 2025 15:43
@joerdav
Copy link
Owner

joerdav commented Jan 27, 2025

Yeah I've tried a couple of things with no luck. I think the problem is that the catch-all route is being hit:

- url: /(.*)/
  static_files: public/\1/index.html
  upload: public/(.*)

The app engine routes work top to bottom, and I think if they match even if there is no file corresponding it doesn't propagate onto the next rule.

@joerdav
Copy link
Owner

joerdav commented Jan 27, 2025

There isn't great documentation around it either.

@joerdav
Copy link
Owner

joerdav commented Jan 27, 2025

I think the answer might be to have a custom python handler?

@joerdav
Copy link
Owner

joerdav commented Jan 27, 2025

Try now https://xcfile.dev/unknown :)

@alexandear
Copy link
Contributor Author

Works! Thank you.

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.

Error pages for docs site
2 participants