which works if I pass static pages on the matcher but It doesn't work for the api. I've also tried to make a wrapper middleware returning an async function inside sort of but I get something like resolver is not defined so how can I make just a simple middleware that checks if the user is logged in on the backend? I've tried lots of tutorials and read the docs too and I can't make it work. Can I get some help or at least get pointed in the right direction?