question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing custom config server (trust proxy) for fastify-cli

See original GitHub issue

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

In Fastify you can use

import Fastify from 'fastify'
const app = Fastify({ trustProxy: true })

https://www.fastify.io/docs/latest/Reference/Server/#trustproxy

But Fastify-cli don’t have way to custom any server config.

Motivation

Easier to custom config server config.

Make Fastify-cli can trust proxy by nginx and many…

Example

fastify-cli TS

-c dist/customOP.js

dev": "tsc && concurrently -k -p \"[{name}]\" -n \"TypeScript,App\" -c \"yellow.bold,cyan.bold\" \"tsc -w\" \"fastify start --ignore-watch=.ts$ -w -l info -p 8081 -P -C dist/customOP.js dist/app.js\""

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
climba03003commented, Jun 27, 2022

I don’t really understand this from the README, and reading the code doesn’t make it much clearer either. I tried to use the options option with a simple example, but so far without luck (or maybe there’s just a simple mistake somewhere).

There is no option call ignoreTrailingSlashes in fastify. Only ignoreTrailingSlash.

0reactions
Eommcommented, Jul 28, 2022

fixed: https://www.npmjs.com/package/fastify-cli/v/4.4.0

something went wrong during the latest release @mcollina

Read more comments on GitHub >

github_iconTop Results From Across the Web

Config File Option · Issue #401 · fastify/fastify-cli - GitHub
Is there a workaround for this? I am new to fastify, and I'd like to set trustProxy to true, but I have no...
Read more >
Server - Fastify
An object used to configure the server's listening socket for TLS. ... number : Trust the nth hop from the front-facing proxy server...
Read more >
fastify-cli - npm
Start using fastify-cli in your project by running `npm i fastify-cli`. ... If you want to use custom options for the server creation, ......
Read more >
Fastify CLI decorators undefined - node.js - Stack Overflow
The issue is that your application diagram looks like this: and when you write const app = await build(t) the app variable points...
Read more >
fastify-curl - npm Package Health Analysis - Snyk
All security vulnerabilities belong to production dependencies of direct and indirect packages. License: ISC. Security Policy: No.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found