Skip to content

Running Librechat bebind GCP Loadbalancer - Not able to disable IP based login ratelimit #3916

Closed Answered by xueshanf
xueshanf asked this question in Troubleshooting
Discussion options

You must be logged in to vote

@danny-avila

I have tested with GCP LB. app.set('trust proxy', true); works, instead of app.set('trust proxy', 1);

I am also able to output logs as you suggested. When app.set('trust proxy', 1), the code doesn't not use client ip (req.ip is LB's address), even X-Forwarded-For and X-Real-IP are both presented in the log. app.set('trust proxy', true); will show req.ip is the real client ip.

I think it might worthwhile to 1. Make an env so to allow customize app.set call. 2. output request ips really helped to nail this down, so a flag to turn it on/off would also be good.

My problem is resolved by app.set('trust proxy', true); Thank you!

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@danny-avila
Comment options

@danny-avila
Comment options

Comment options

You must be logged in to vote
2 replies
@lindner-tj
Comment options

@xueshanf
Comment options

Answer selected by xueshanf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #3915 on September 04, 2024 05:02.