DenoDDeno
Powered by
MaxM
Denoβ€’3y agoβ€’
1 reply
Max

Custom `401 Unauthorized` error page, similar to builtin `404 Not Found`?

How can I create a custom error page that is rendered by middleware in Fresh? The middleware handles authentication for incoming requests and if a request fails authentication, the middleware should generate a 401 Unauthorized response that includes the body of the custom error page.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Astro 404 page not working
Joe ChipJJoe Chip / help
2y ago
Error The deployment failed Module not found
beermanBbeerman / help
4y ago