I've a react application with username/password login authentications with dotnetcore backend. I want to add a static html page for terms and condition as a separate static html url e.g. localhost/terms/index.html. I can put terms/index.html in the public folder of the react application or serve as a separate url in the nginx. But I want to make static html page terms/index.html available to only logged in users in react app. With current implementation, terms/index html is available even after I logged out of the react application. How can I do this either in react app or in nginx configuration?
location / {
root html\myreactappwithlogin;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /terms {
root html\terms;
try_files $uri /index.html =404;
}
location /api {
proxy_pass http://localhost:9000;
}