Skip to content

Commit ff77086

Browse files
authored
Merge pull request #1638 from wnhre2ur8cxx8/docs-nginx
Incomplete instructions for stripping nginx's logs of api keys.
2 parents 78ee655 + 9733352 commit ff77086

File tree

1 file changed

+2
-1
lines changed
  • docs/general/post-install/networking/8_reverse-proxy

1 file changed

+2
-1
lines changed

docs/general/post-install/networking/8_reverse-proxy/nginx.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ server {
9494

9595
### Censor sensitive information in logs
9696

97-
This censors any 'api_key' URL parameter from the logfile.
97+
This censors any 'api_key' or 'ApiKey' URL parameter from the logfile.
9898

9999
```conf
100100
#Must be in HTTP block
@@ -105,6 +105,7 @@ log_format stripsecrets '$remote_addr $host - $remote_user [$time_local] '
105105
106106
map $request $secretfilter {
107107
~*^(?<prefix1>.*[\?&]api_key=)([^&]*)(?<suffix1>.*)$ "${prefix1}***$suffix1";
108+
~*^(?<prefix1>.*[\?&]ApiKey=)([^&]*)(?<suffix1>.*)$ "${prefix1}***$suffix1";
108109
default $request;
109110
}
110111

0 commit comments

Comments
 (0)