Isolating containers from internet access to enhance security.

This commit is contained in:
ben
2023-03-04 22:22:22 +01:00
parent f3eae794ac
commit 207592ff57
9 changed files with 53 additions and 22 deletions

View File

@@ -39,14 +39,10 @@ http {
}
server {
listen 8001;
set $deny 1;
if ($http_authorization = "Bearer $API_KEY") {
set $deny 0;
}
if ($deny) {
return 403;
}
location / {
auth_basic "Private Area";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://aichat:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;