[nextcloud-web] Remove ::ffff: from X-Forwarded-For (possible cause of the throttling we are seeing
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nextcloud-web] Remove ::ffff: from X-Forwarded-For (possible cause of the throttling we are seeing
- Date: Tue, 22 Jun 2021 14:24:27 +0000 (UTC)
commit 2a9139ed80a7b97427909dec2eb04baca6cfc3bf
Author: Andrea Veri <averi redhat com>
Date: Tue Jun 22 16:24:16 2021 +0200
Remove ::ffff: from X-Forwarded-For (possible cause of the throttling we are seeing
nginx/nginx.conf | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index 554ce9f..eab307a 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -27,6 +27,11 @@ http {
server localhost:9000;
}
+ map $proxy_add_x_forwarded_for $custom_x_forwarded_for {
+ default $proxy_add_x_forwarded_for;
+ ^::ffff: '';
+ }
+
server {
listen *:8443 ssl;
listen [::]:8443 ssl;
@@ -40,6 +45,9 @@ http {
set_real_ip_from 10.0.0.0/8;
real_ip_header X-Forwarded-For;
+ # Prevent X-Forwarded-For to include ::ffff:
+ proxy_set_header X-Forwarded-For $custom_x_forwarded_for;
+
# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this
# topic first.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]