Skip to content

Commit 2d3c697

Browse files
CLDSRV-717: Sproxyd nginx replace tab with spaces
1 parent c0fc6a7 commit 2d3c697

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

.github/docker/sproxyd/conf/nginx.conf

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,36 +39,36 @@ http {
3939
deny all;
4040
set $usermd '-';
4141
set $sentusermd '-';
42-
set $elapsed_ms '-';
43-
set $now '-';
44-
log_by_lua '
45-
if not(ngx.var.http_x_scal_usermd == nil) and string.len(ngx.var.http_x_scal_usermd) > 2 then
46-
ngx.var.usermd = string.sub(ngx.decode_base64(ngx.var.http_x_scal_usermd),1,-3)
47-
end
42+
set $elapsed_ms '-';
43+
set $now '-';
44+
log_by_lua '
45+
if not(ngx.var.http_x_scal_usermd == nil) and string.len(ngx.var.http_x_scal_usermd) > 2 then
46+
ngx.var.usermd = string.sub(ngx.decode_base64(ngx.var.http_x_scal_usermd),1,-3)
47+
end
4848
if not(ngx.var.sent_http_x_scal_usermd == nil) and string.len(ngx.var.sent_http_x_scal_usermd) > 2 then
4949
ngx.var.sentusermd = string.sub(ngx.decode_base64(ngx.var.sent_http_x_scal_usermd),1,-3)
5050
end
51-
local elapsed_ms = tonumber(ngx.var.request_time)
52-
if not ( elapsed_ms == nil) then
53-
elapsed_ms = elapsed_ms * 1000
54-
ngx.var.elapsed_ms = tostring(elapsed_ms)
55-
end
56-
local time = tonumber(ngx.var.msec) * 1000
57-
ngx.var.now = time
58-
';
51+
local elapsed_ms = tonumber(ngx.var.request_time)
52+
if not ( elapsed_ms == nil) then
53+
elapsed_ms = elapsed_ms * 1000
54+
ngx.var.elapsed_ms = tostring(elapsed_ms)
55+
end
56+
local time = tonumber(ngx.var.msec) * 1000
57+
ngx.var.now = time
58+
';
5959
log_format irm '{ "time":"$now","connection":"$connection","request":"$connection_requests","hrtime":"$msec",'
6060
'"httpMethod":"$request_method","httpURL":"$uri","elapsed_ms":$elapsed_ms,'
6161
'"httpCode":$status,"requestLength":$request_length,"bytesSent":$bytes_sent,'
62-
'"contentLength":"$content_length","sentContentLength":"$sent_http_content_length",'
63-
'"contentType":"$content_type","s3Address":"$remote_addr",'
64-
'"requestUserMd":"$usermd","responseUserMd":"$sentusermd",'
62+
'"contentLength":"$content_length","sentContentLength":"$sent_http_content_length",'
63+
'"contentType":"$content_type","s3Address":"$remote_addr",'
64+
'"requestUserMd":"$usermd","responseUserMd":"$sentusermd",'
6565
'"ringKeyVersion":"$sent_http_x_scal_version","ringStatus":"$sent_http_x_scal_ring_status",'
66-
'"s3Port":"$remote_port","sproxydStatus":"$upstream_status","req_id":"$http_x_scal_request_uids",'
67-
'"ifMatch":"$http_if_match","ifNoneMatch":"$http_if_none_match",'
66+
'"s3Port":"$remote_port","sproxydStatus":"$upstream_status","req_id":"$http_x_scal_request_uids",'
67+
'"ifMatch":"$http_if_match","ifNoneMatch":"$http_if_none_match",'
6868
'"range":"$http_range","contentRange":"$sent_http_content_range","nginxPID":$PID,'
6969
'"sproxydAddress":"$upstream_addr","sproxydResponseTime_s":"$upstream_response_time" }';
7070
access_log /dev/stdout irm;
71-
error_log /dev/stdout error;
71+
error_log /dev/stdout error;
7272
location / {
7373
proxy_request_buffering off;
7474
fastcgi_request_buffering off;

0 commit comments

Comments
 (0)