Skip to content

Commit

Permalink
Merge pull request #21 from Intellection/add-x-request-start-header
Browse files Browse the repository at this point in the history
[SRE-3433] Add x-request-start header
  • Loading branch information
zacblazic authored Feb 28, 2024
2 parents 1d90124 + ae617cd commit ee2882d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.25.4

* Add `X-Request-Start` header set to current time with millisecond precision.
* Update base image to `zappi/nginx:1.25.4`.

## 1.25.3-1

* Add OpenTelemetry (OTel) module i.e. `nginx-module-otel`.
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM zappi/nginx:1.25.3 as builder
FROM zappi/nginx:1.25.4 as builder

USER root

Expand All @@ -16,9 +16,9 @@ RUN apt-get update -y && \
WORKDIR /usr/src/

# Download nginx source
ARG NGINX_VERSION="1.25.3"
ARG NGINX_VERSION="1.25.4"
ARG NGINX_PKG="nginx-${NGINX_VERSION}.tar.gz"
ARG NGINX_SHA="64c5b975ca287939e828303fa857d22f142b251f17808dfe41733512d9cded86"
ARG NGINX_SHA="760729901acbaa517996e681ee6ea259032985e37c2768beef80df3a877deed9"
RUN wget "http://nginx.org/download/${NGINX_PKG}" && \
echo "${NGINX_SHA} *${NGINX_PKG}" | sha256sum -c - && \
tar --no-same-owner -xzf ${NGINX_PKG} --one-top-level=nginx --strip-components=1
Expand All @@ -37,7 +37,7 @@ RUN cd nginx && \
make modules

# Production container starts here
FROM zappi/nginx:1.25.3
FROM zappi/nginx:1.25.4

USER root

Expand Down
1 change: 1 addition & 0 deletions config/http.conf
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ http {
proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;
proxy_set_header X-Request-ID $proxy_x_request_id;
proxy_set_header X-Forwarded-Host $proxy_x_forwarded_host;
proxy_set_header X-Request-Start "t=${msec}";

# Latency headers
add_header X-Proxy-Backend-Connect-Time $upstream_connect_time;
Expand Down

0 comments on commit ee2882d

Please sign in to comment.