diff --git a/Docker/nginx/template.conf b/Docker/nginx/template.conf index 1e8de864..e374bf5f 100644 --- a/Docker/nginx/template.conf +++ b/Docker/nginx/template.conf @@ -5,11 +5,16 @@ upstream frappe-bench-frappe { upstream frappe-bench-socketio-server { server socketio:80 fail_timeout=120; } + +log_format prod_log '{"Request":"$request","Status":"$status","Request_URI":"$request_uri","Host":"$host","Client_IP":"$remote_addr","Proxy_IP(s)":"$proxy_add_x_forwarded_for","Proxy_Hostname":"$proxy_host","Real_IP":"$http_x_real_ip","User_Client":"$http_user_agent","TimeTaken":"$request_time","ContentType":"$content_type"}'; + server { listen 80; listen [::]:80; + access_log /var/log/nginx/access.log prod_log; + server_name {{ ' '.join(SITENAME.split(',')) }}; root /workspace/frappe-bench/sites; @@ -23,6 +28,7 @@ server { add_header X-XSS-Protection "1; mode=block"; add_header Referrer-Policy "same-origin, strict-origin-when-cross-origin"; + server_tokens off; location /assets { try_files $uri =404;