Update webstats_log.lua

This commit is contained in:
dami
2026-07-05 15:47:23 +08:00
parent 03fdbf2604
commit 167dd11548
+2 -1
View File
@@ -200,7 +200,8 @@ local function run_app()
local request_uri = ngx.var.request_uri
local body_length = C:get_length()
local domain = host or "unknown"
local http_protocol = ngx.var.scheme or "http"
local forwarded_proto = ngx.var.http_x_forwarded_proto or ngx.var.http_x_forwarded_protocol or ngx.var.http_x_scheme or ""
local http_protocol = forwarded_proto ~= "" and string.lower(forwarded_proto) or (ngx.var.scheme or "http")
local kv = {
id = new_id,