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

Add redirect method and custom 404 error handling #148

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

javad-zobeidi
Copy link
Collaborator

  1. Add redirect method ([Feature Request] - Add redirect method for redirecting to a specific location #144):

    • A new redirect method is added to the Response class to simplify HTTP redirections.
  2. Add custom 404 error handling via HTML file ([Feature Request] - How can I manage the 404 route? #145):

    • Custom handling for 404 errors is implemented, serving a user-defined HTML page when a page is not found, enhancing the error-handling experience.
    • To enable this feature, create an errors directory in the root of the project.
    • Inside the errors directory, create a 404.html file at errors/404.html.
    • This approach enhances the error-handling experience, providing a more user-friendly response for missing pages.

Errors directory placement:

- lib
- errors
    --- 404.html

@javad-zobeidi javad-zobeidi merged commit 8b962c3 into vania-dart:dev Nov 25, 2024
1 check passed
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