diff --git a/src/fastapi_app/nginx/nginx.conf b/src/fastapi_app/nginx/nginx.conf index 3af90b5..b075088 100644 --- a/src/fastapi_app/nginx/nginx.conf +++ b/src/fastapi_app/nginx/nginx.conf @@ -5,18 +5,19 @@ events { } http { + server_tokens off; include mime.types; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; + '"$http_user_agent" "$http_x_forwarded_for" "$request_id"'; - server_tokens off; + access_log /dev/stdout main; sendfile on; tcp_nodelay on; tcp_nopush on; client_max_body_size 200m; - + gzip on; gzip_comp_level 3; gzip_min_length 1000; @@ -27,9 +28,12 @@ http { application/x-javascript text/xml text/javascript; - + + add_header X-Request-Id $request_id; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + include conf.d/api.conf; }