Skip to content

Most secure trustProxy value for a local reverse proxy?聽#1093

Open

Description

@LJNeon

馃挰 Question here

The fastify service is listening on localhost and on the same server the reverse proxy listens externally on ports 80/443.

Since the fastify service isn't listening to external requests I think setting trustProxy to true should be safe. But I prefer using the strictest settings possible, better to do so and never need it than to not do so and regret it after it's too late.

What would that strictest setting be? To me it looks like it would be "localhost" based on the docs but will that cause any issues? Is it actually the strictest value that will work?

Your Environment

  • node version: 22
  • fastify version: >=5.0.0
  • os: Linux

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions