mirror of
https://github.com/stan-smith/FossFLOW.git
synced 2026-06-11 20:44:24 -04:00
* feat(docker): add HTTP Basic Authentication support * fix: address review feedback * Update docker-entrypoint.sh * Update .env.example Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: use bcrypt for htpasswd and ensure .htpasswd file always exists --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
35 lines
1.0 KiB
Nginx Configuration File
35 lines
1.0 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
# Basic authentication (AUTH_BASIC_SETTING replaced by docker-entrypoint.sh)
|
|
auth_basic AUTH_BASIC_SETTING;
|
|
auth_basic_user_file /etc/nginx/.htpasswd;
|
|
server_name localhost;
|
|
|
|
# Allow larger request bodies (up to 10MB)
|
|
client_max_body_size 10M;
|
|
|
|
# Serve static files
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
try_files $uri /index.html;
|
|
}
|
|
|
|
# Proxy API requests to Node.js backend
|
|
location /api/ {
|
|
proxy_pass http://localhost:3001;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
proxy_set_header Host $host;
|
|
proxy_cache_bypass $http_upgrade;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
# Allow larger bodies for API requests
|
|
client_max_body_size 10M;
|
|
proxy_read_timeout 300s;
|
|
proxy_connect_timeout 75s;
|
|
}
|
|
}
|