NNuxt•Created by /home/devNaimul on 6/25/2024 in #❓・help Infinite redirect in middleware
export default defineNuxtRouteMiddleware(async (to, from) => {
const url = useRequestURL();
if (!url.href.includes("localhost:3000") && !url.href.includes("ejily.com")) {
// return abortNavigation();
return navigateTo("/");
}
});
this is working now.