Skip to content

Commit

Permalink
Added case normalization to headers to prevent case sensitive issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rorylshanks committed Mar 17, 2024
1 parent 91b5444 commit d613e3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions util/caddyModels.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ async function saturateRoute(route, routeId) {
if (route.claims_headers) {
var headersArray = Object.keys(route.claims_headers)
for (var header of headersArray) {
copyHeaders[header] = [
`{http.reverse_proxy.header.${header}}`
copyHeaders[utils.convertHeaderCase(header)] = [
`{http.reverse_proxy.header.${utils.convertHeaderCase(header)}}`
]
}
}
if (route.request_header_map_headers) {
for (var header of route.request_header_map_headers) {
copyHeaders[header] = [
`{http.reverse_proxy.header.${header}}`
copyHeaders[utils.convertHeaderCase(header)] = [
`{http.reverse_proxy.header.${utils.convertHeaderCase(header)}}`
]
}
}
Expand Down

0 comments on commit d613e3b

Please sign in to comment.