From ef8764cb06f2e4ee77328d1f4d00acabe5027f2f Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Wed, 9 Oct 2024 08:18:49 -0700 Subject: [PATCH] logging: Add UPDATE to valid http methods We introduced this a while back, but forgot to add it then. Related-Change: Ia13ee5da3d1b5c536eccaadc7a6fdcd997374443 Change-Id: Ib65ddf50d7f5c3e27475626000943eb18e65c73a --- etc/proxy-server.conf-sample | 2 +- swift/common/middleware/proxy_logging.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/proxy-server.conf-sample b/etc/proxy-server.conf-sample index 0a3de342cb..d290ea78b2 100644 --- a/etc/proxy-server.conf-sample +++ b/etc/proxy-server.conf-sample @@ -1029,7 +1029,7 @@ use = egg:swift#proxy_logging # # What HTTP methods are allowed for StatsD logging (comma-sep); request methods # not in this list will have "BAD_METHOD" for the portion of the metric. -# log_statsd_valid_http_methods = GET,HEAD,POST,PUT,DELETE,COPY,OPTIONS +# log_statsd_valid_http_methods = GET,HEAD,POST,PUT,DELETE,COPY,OPTIONS,UPDATE # # Hashing algorithm for log anonymization. Must be one of algorithms supported # by Python's hashlib. diff --git a/swift/common/middleware/proxy_logging.py b/swift/common/middleware/proxy_logging.py index 330adb7624..f4d2bc6ff9 100644 --- a/swift/common/middleware/proxy_logging.py +++ b/swift/common/middleware/proxy_logging.py @@ -137,7 +137,7 @@ class ProxyLoggingMiddleware(object): self.valid_methods = conf.get( 'access_log_statsd_valid_http_methods', conf.get('log_statsd_valid_http_methods', - 'GET,HEAD,POST,PUT,DELETE,COPY,OPTIONS')) + 'GET,HEAD,POST,PUT,DELETE,COPY,OPTIONS,UPDATE')) self.valid_methods = [m.strip().upper() for m in self.valid_methods.split(',') if m.strip()] access_log_conf = {}