-
-
Notifications
You must be signed in to change notification settings - Fork 173
Open
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
4.12.0
Node.js version
18.12.1
Operating system
macOS
Description
I cannot set trustProxy to true when starting my fastify server with fastify-cli.
Steps to Reproduce
-
Use config.js:
\\javascript
module.exports = {
trustProxy: true,
port: 3300
}
\
then run: \astify start -l warn --config config.js dist/App.js\ -
Use .env file:
\TRUST_PROXY=true\ or \TRUST_PROXY=1\ -
Pass env variable:
\TRUST_PROXY=true fastify start -l warn dist/App.js\
None of them are setting trustProxy to true. The only way it works is by creating the server manually with trustProxy: true in code.
Expected Behavior
I expected at least one of them to work, the env file or config.js
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels