Skip to content

Commit

Permalink
Merge pull request #1034 from akrherz/domain
Browse files Browse the repository at this point in the history
📝 Write domain to weblog
  • Loading branch information
akrherz authored Mar 7, 2025
2 parents 65a72a0 + cdb75e0 commit 1d9f9df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pyiem/webutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,9 @@ def log_request(environ):
sql_helper(
"""
INSERT into weblog
(client_addr, uri, referer, http_status, x_forwarded_for)
VALUES (:client_addr, :uri, :referer, :http_status, :x_forwarded_for)
(client_addr, uri, referer, http_status, x_forwarded_for, domain)
VALUES (:client_addr, :uri, :referer, :http_status, :x_forwarded_for,
:domain)
"""
),
{
Expand All @@ -220,6 +221,7 @@ def log_request(environ):
"referer": environ.get("HTTP_REFERER"),
"http_status": 404,
"x_forwarded_for": environ.get("HTTP_X_FORWARDED_FOR"),
"domain": environ.get("HTTP_HOST"),
},
)
conn.commit()
Expand Down

0 comments on commit 1d9f9df

Please sign in to comment.