Skip to content

Commit

Permalink
feat: Mark refresh token headers as sensitive (#347)
Browse files Browse the repository at this point in the history
These aren't standard headers, but we can provide them as a default in
case they exist and we decide to make them a convention in Roadster in
the future.
  • Loading branch information
spencewenski authored Aug 22, 2024
1 parent e140eb2 commit 371de6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config/service/http/config/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ default-enable = true

[service.http.middleware.sensitive-request-headers]
priority = -10000
header-names = ["authorization", "proxy-authorization", "cookie", "set-cookie"]
header-names = ["authorization", "refresh-token", "x-refresh-token", "proxy-authorization", "cookie", "set-cookie"]

[service.http.middleware.sensitive-response-headers]
priority = 10000
header-names = ["authorization", "proxy-authorization", "cookie", "set-cookie"]
header-names = ["authorization", "refresh-token", "x-refresh-token", "proxy-authorization", "cookie", "set-cookie"]

[service.http.middleware.set-request-id]
priority = -9990
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ default-enable = true
priority = -10000
header-names = [
'authorization',
'refresh-token',
'x-refresh-token',
'proxy-authorization',
'cookie',
'set-cookie',
Expand All @@ -43,6 +45,8 @@ header-names = [
priority = 10000
header-names = [
'authorization',
'refresh-token',
'x-refresh-token',
'proxy-authorization',
'cookie',
'set-cookie',
Expand Down

0 comments on commit 371de6b

Please sign in to comment.