ValidationError: The 'X-Forwarded-For' header is set but the Express 'trust proxy' setting is false (default). #3583
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
samples
Issues that are directly related to samples.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
In which file did you encounter the issue?
https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/main/run/filesystem/index.js
Did you change the file? If so, how?
No, happy to raise a PR.
Describe the issue
Following the https://cloud.google.com/run/docs/tutorials/network-filesystems-filestore#before-you-begin created a Cloud Run service with VPC connector and Filestore.
Making an authenticated HTTP POST request from a VM probably behind a proxy to this Cloud Run app URL resulted in an HTTP 302 with a error logged to the Cloud Logging.
CURL request and response
Fix: https://github.com/express-rate-limit/express-rate-limit/wiki/Troubleshooting-Proxy-Issues
https://express-rate-limit.mintlify.app/reference/error-codes#err-erl-unexpected-x-forwarded-for
The text was updated successfully, but these errors were encountered: