Set real IP from local proxy
This commit is contained in:
		
					parent
					
						
							
								ce5e907ed8
							
						
					
				
			
			
				commit
				
					
						131fc871b7
					
				
			
		
					 7 changed files with 23 additions and 0 deletions
				
			
		| 
						 | 
					@ -21,6 +21,9 @@
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    extraConfig = ''
 | 
					    extraConfig = ''
 | 
				
			||||||
      add_header X-Content-Type-Options nosniff;
 | 
					      add_header X-Content-Type-Options nosniff;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      set_real_ip_from 127.0.0.1;
 | 
				
			||||||
 | 
					      real_ip_header proxy_protocol;
 | 
				
			||||||
    '';
 | 
					    '';
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -78,6 +78,9 @@ in
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # redirect server error pages to the static page /50x.html
 | 
					      # redirect server error pages to the static page /50x.html
 | 
				
			||||||
      error_page   500 502 503 504  /50x.html;
 | 
					      error_page   500 502 503 504  /50x.html;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      set_real_ip_from 127.0.0.1;
 | 
				
			||||||
 | 
					      real_ip_header proxy_protocol;
 | 
				
			||||||
    '';
 | 
					    '';
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,6 +26,9 @@
 | 
				
			||||||
    extraConfig = ''
 | 
					    extraConfig = ''
 | 
				
			||||||
      client_max_body_size 1024m;
 | 
					      client_max_body_size 1024m;
 | 
				
			||||||
      add_header X-Content-Type-Options nosniff;
 | 
					      add_header X-Content-Type-Options nosniff;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      set_real_ip_from 127.0.0.1;
 | 
				
			||||||
 | 
					      real_ip_header proxy_protocol;
 | 
				
			||||||
    '';
 | 
					    '';
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -28,6 +28,9 @@
 | 
				
			||||||
      client_max_body_size 1024m;
 | 
					      client_max_body_size 1024m;
 | 
				
			||||||
      add_header X-Frame-Options DENY;
 | 
					      add_header X-Frame-Options DENY;
 | 
				
			||||||
      add_header X-Content-Type-Options nosniff;
 | 
					      add_header X-Content-Type-Options nosniff;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      set_real_ip_from 127.0.0.1;
 | 
				
			||||||
 | 
					      real_ip_header proxy_protocol;
 | 
				
			||||||
    '';
 | 
					    '';
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,5 +18,9 @@
 | 
				
			||||||
    locations."/" = {
 | 
					    locations."/" = {
 | 
				
			||||||
      proxyPass = "http://cloudtube.vs.grzb.de:10412";
 | 
					      proxyPass = "http://cloudtube.vs.grzb.de:10412";
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					    extraConfig = ''
 | 
				
			||||||
 | 
					      set_real_ip_from 127.0.0.1;
 | 
				
			||||||
 | 
					      real_ip_header proxy_protocol;
 | 
				
			||||||
 | 
					    '';
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -28,5 +28,9 @@
 | 
				
			||||||
        add_header Access-Control-Allow-Origin *;
 | 
					        add_header Access-Control-Allow-Origin *;
 | 
				
			||||||
      '';
 | 
					      '';
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					    extraConfig = ''
 | 
				
			||||||
 | 
					      set_real_ip_from 127.0.0.1;
 | 
				
			||||||
 | 
					      real_ip_header proxy_protocol;
 | 
				
			||||||
 | 
					    '';
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,6 +21,9 @@
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    extraConfig = ''
 | 
					    extraConfig = ''
 | 
				
			||||||
      client_max_body_size 80m;
 | 
					      client_max_body_size 80m;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      set_real_ip_from 127.0.0.1;
 | 
				
			||||||
 | 
					      real_ip_header proxy_protocol;
 | 
				
			||||||
    '';
 | 
					    '';
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue