I have a WebApi 2 project where i have a Cookie Authentication API, once the user has been Authenticated he can use all other APIs, my front-end is based on jquery and js. Now i would merge the front-end project to the back-end, so i've added my JS project as static files to my WebApi 2 project.
But now i would secure some of pages which users should reach only if the user is Authenticated.
Here is my project structure:
By default the user is redirected to index.html and then he can access the menu.html but menu.html must be served to the user only if he is Authenticated, i've read in other similar questions that i should use something like a middleware, but i would know if it's the right approach to serve the front end as static files and if it's the wrong one, what sould i do in my case?