Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docker): exclude /healthcheck from access logs #279

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions infra/docker/api/api.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
map $request_uri $should_log {
default 1;
# The security group healthcheck endpoint.
~^/healthcheck 0;
}

server {
listen 8080;
listen [::]:8080;
Expand All @@ -6,6 +12,8 @@ server {

root /var/www/html/public;

access_log /dev/stdout main if=$should_log;

# Prevent some browsers from MIME-sniffing the response.
#
# This reduces exposure to drive-by download attacks and cross-origin data
Expand Down
8 changes: 8 additions & 0 deletions infra/docker/internal/internal.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
map $request_uri $should_log {
default 1;
# The security group healthcheck endpoint.
~^/healthcheck 0;
}

# Add Access-Control-Allow-Origin.
map $sent_http_content_type $cors {
# Images
Expand Down Expand Up @@ -31,6 +37,8 @@ server {

root /var/www/html/public;

access_log /dev/stdout main if=$should_log;

# Protect website against clickjacking.
#
# The example below sends the `X-Frame-Options` response header with the value
Expand Down
8 changes: 8 additions & 0 deletions infra/docker/selfserve/selfserve.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
map $request_uri $should_log {
default 1;
# The security group healthcheck endpoint.
~^/healthcheck 0;
}

# Add Access-Control-Allow-Origin.
map $sent_http_content_type $cors {
# Images
Expand Down Expand Up @@ -31,6 +37,8 @@ server {

root /var/www/html/public;

access_log /dev/stdout main if=$should_log;

# Protect website against clickjacking.
#
# The example below sends the `X-Frame-Options` response header with the value
Expand Down