Skip to content

Commit

Permalink
feat(logto.ts): add TRUST_PROXY_HEADER environment variable to deploy…
Browse files Browse the repository at this point in the history
…ment stack

Adding the TRUST_PROXY_HEADER environment variable with a value of "1"
enables the application to trust the proxy headers. This is crucial for
correctly determining the client's IP address and other request details
in environments where the app is served behind a proxy, such as load
balancers or reverse proxies. This change ensures accurate logging and
security handling in production environments.
  • Loading branch information
cybersiddhu committed Aug 12, 2024
1 parent 4c49155 commit 300b524
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/construct/middleware/logto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ class LogtoBackendDeploymentStack extends TerraformStack {
value: decodeSecretData(secret?.data?.password as string),
},
{ name: "ENDPOINT", value: endpoint },
{ name: "TRUST_PROXY_HEADER", value: "1" },
)
}
#ports({ adminService, apiService, adminPort, apiPort }: portPropterties) {
Expand Down

0 comments on commit 300b524

Please sign in to comment.