Use nginx for static caching, but non-logged-in users are not allowed to access the data display page. If configured as follows, even logged-in users cannot access it. Xiaobai please answer
#不登录情况下禁止直接访问
location ^~ /admin/{
deny all;
}
#location ^~ /js/{
# deny all;
#}
You can use http auth to restrict access. A box will pop up during access, allowing you to enter your account password. After entering, you can have unlimited access.
For specific configuration, please refer to nginx http auth module:
http://nginx.org/en/docs/http/ngx_http_auth_basic_module.html