generated from nhcarrigan/template
feat: base64 uploads, reusable forms, Discord roles, and UX improvements #66
@@ -21,8 +21,8 @@ export default async function staticPlugin(app: FastifyInstance) {
|
|||||||
|
|
||||||
// Catch-all route for Angular SPA routing (must be registered after API routes)
|
// Catch-all route for Angular SPA routing (must be registered after API routes)
|
||||||
app.setNotFoundHandler((request, reply) => {
|
app.setNotFoundHandler((request, reply) => {
|
||||||
// Only catch routes that don't start with /api
|
// Only catch routes that don't start with /api or /assets
|
||||||
if (!request.url.startsWith("/api")) {
|
if (!request.url.startsWith("/api") && !request.url.startsWith("/assets")) {
|
||||||
reply.sendFile("index.html");
|
reply.sendFile("index.html");
|
||||||
} else {
|
} else {
|
||||||
reply.code(404).send({ error: "Not Found" });
|
reply.code(404).send({ error: "Not Found" });
|
||||||
|
|||||||
Reference in New Issue
Block a user