The middleware.ts not working in custom app directory
Answered
Turkey Vulture posted this in #help-forum
Turkey VultureOP
the middleware is on the root directory of app but it not working. if i moved into src it worked. so weird
Answered by Z4NR34L
if you are using app directory at root, migrate everything out from src, or opposite, your middleware.ts should be always in same level as app or pages directory (if you use src dir, put it inside)
5 Replies
Turkey VultureOP
You can have src or app directory, never both in same tree level
if you are using app directory at root, migrate everything out from src, or opposite, your middleware.ts should be always in same level as app or pages directory (if you use src dir, put it inside)
Answer
Turkey VultureOP
ah thanks @Z4NR34L
No problem! If that solved your problem, please mark a message as the answer for your post with
Right click -> Apps -> Mark Solution