adonisjs / v6-docs

Documentation website for AdonisJS v6
38 stars 53 forks source link

trustProxy configuration path #107

Closed ad-momo closed 1 month ago

ad-momo commented 1 month ago

Hello,

The path for trust proxy configuration is http.trustProxy but when I use this path in code then I have type error.

I think the good path is only trustProxy ?

import proxyAddr from 'proxy-addr'

{
  trustProxy: proxyAddr.compile(['127.0.0.1/8', '::1/128'])
}

Below all reference in doc:

https://github.com/adonisjs/v6-docs/blob/eb1d308670e1f6ee6574b1f7c3e94ed9a7e5114d/content/docs/basics/request.md?plain=1#L356-L358

https://github.com/adonisjs/v6-docs/blob/eb1d308670e1f6ee6574b1f7c3e94ed9a7e5114d/content/docs/basics/request.md?plain=1#L366-L370

https://github.com/adonisjs/v6-docs/blob/eb1d308670e1f6ee6574b1f7c3e94ed9a7e5114d/content/docs/basics/request.md?plain=1#L380-L382

https://github.com/adonisjs/v6-docs/blob/eb1d308670e1f6ee6574b1f7c3e94ed9a7e5114d/content/docs/basics/request.md?plain=1#L390-L392

https://github.com/adonisjs/v6-docs/blob/eb1d308670e1f6ee6574b1f7c3e94ed9a7e5114d/content/docs/basics/request.md?plain=1#L350

ad-momo commented 1 month ago

Ok sorry, I had not understand the documentation because of the defineConfig function