Remove Netlify adapter from Astro configuration and clean up translations by deleting unused sections for blog and Anti-Fingerprinting Shield Plus. This streamlines the project and improves maintainability.
This commit is contained in:
10
src/middleware.ts
Normal file
10
src/middleware.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { defineMiddleware } from 'astro:middleware';
|
||||
|
||||
export const onRequest = defineMiddleware(async (context, next) => {
|
||||
// Only redirect if we're at the root path
|
||||
if (context.url.pathname === '/') {
|
||||
return context.redirect('/en', 301);
|
||||
}
|
||||
|
||||
return next();
|
||||
});
|
Reference in New Issue
Block a user