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

fix: dashboard 404 #948

Closed
wants to merge 1 commit into from
Closed

fix: dashboard 404 #948

wants to merge 1 commit into from

Conversation

quanljh
Copy link
Contributor

@quanljh quanljh commented Jan 5, 2025

Currently, there is a bug where the dashboard page returns a 404 error.
image

In order to return 404 https status code when the path is not defined in frontend router, we can fallback all request to frontend but add a /404 path to return 404 status code. And in frontend, we redirect all undefined paths to /404 on not-found page.

Related frontend PRs:
hamster1963/nezha-dash-v1#26
nezhahq/admin-frontend#92

Tested in my server

  1. Dashboard 200 OK
    image

  2. Dashboard 404
    image

  3. User page 404
    image

@naiba
Copy link
Member

naiba commented Jan 5, 2025

/dashboard 原本就不是个 folder,可以后端做个跳转,搞这么复杂就远了

@naiba naiba closed this Jan 5, 2025
@quanljh
Copy link
Contributor Author

quanljh commented Jan 5, 2025

@naiba /dashboard/service 这种也会404,fix的时候记得cover 下

@naiba
Copy link
Member

naiba commented Jan 5, 2025 via email

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.

2 participants