-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
[Question] Is there a way to customize the 404 logic? #300
Comments
Hey Bruno, Anyone knows of a tool which supports that? One could think of a scripting language like lua or a way to run custom shell scripts, but I don't think it will be quite elegant. The best solution I can think of is to create a custom checker based on lychee-lib as a library. It would require quite some Rust work I guess. |
Hey Matthias, thanks for the reply. I think a good UX could be something like: lychee https://coder.com/docs/coder/blablabla --body "meta[canonical='https://coder.com/404']" The user can pass a body option containing a CSS selector or even a REGEX if that is easier. Unfortunately, I have 0 skills in Rust 😅 |
What if you checked multiple websites? Should the |
See this article at 35% mark: https://pretagteam.com/question/how-to-remove-404-error-in-nextjs-or-react-js Next.js is able to return custom 404 page with 404 return code. |
In all cases without exception, we should expect the server to comply to IETF RFC 7231. Treating well-defined return code in non-standard way should not be considered. |
Since currently with default However, I guess the recursion feature has some basic function/method for this, probably only applied to An I remember (cannot find currently) another request which required the whole response, so probably functions/methods can be reasonably shared as a basis for further such features. |
Closing this as there is a preferable solution provided by @lebensterben and for the reasons stated in the comments. |
I have an app built using NextJS, and usually, the 404 page of NextJS returns the 200 status code because it is a static page. So, I would like to check the page using its body, looking for the canonical meta tag. Is that possible?
The text was updated successfully, but these errors were encountered: