Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

714
Views
GCP CLB: ¿cómo obtener X-Forwarded-For IP en Nginx.conf?

Según el documento de GCP, https://cloud.google.com/load-balancing/docs/https#target-proxies , X-Forwarded-For contiene varias IP, por ejemplo 1.2.3.4, 5.6.7.8 , donde 1.2.3.4 es el IP de cliente real, 5.6.7.8 es la IP CLB.

¿Cómo puedo obtener 1.2.3.4 en nginx.conf ? Quiero usarlo con geoip.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puede usar el módulo IP real para desglosar X-Forwarded-For y establecer la variable $remote_addr con el valor adecuado.

Por ejemplo:

 set_real_ip_from 5.6.7.8; real_ip_header X-Forwarded-For; real_ip_recursive on;

El valor de $remote_addr se cambia de 5.6.7.8 a 1.2.3.4 .

En muchas distribuciones de Nginx, este módulo ya está presente. Use nginx -V para confirmar qué módulos están presentes.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!