[~] Refactor
This commit is contained in:
		
							parent
							
								
									4f4c04b46e
								
							
						
					
					
						commit
						7e0555fc79
					
				| @ -18,7 +18,7 @@ with io.open( | |||||||
|         sections.append(r''' |         sections.append(r''' | ||||||
|     location ^~ /{app_name}/ { |     location ^~ /{app_name}/ { | ||||||
|       proxy_set_header Host $http_host; |       proxy_set_header Host $http_host; | ||||||
|       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |       proxy_set_header X-Forwarded-For $t1; | ||||||
|       proxy_set_header X-Forwarded-Proto $scheme; |       proxy_set_header X-Forwarded-Proto $scheme; | ||||||
|       proxy_set_header Upgrade $http_upgrade; |       proxy_set_header Upgrade $http_upgrade; | ||||||
|       proxy_set_header Connection $connection_upgrade; |       proxy_set_header Connection $connection_upgrade; | ||||||
| @ -39,7 +39,7 @@ events { | |||||||
| 
 | 
 | ||||||
| http { | http { | ||||||
|   log_format main |   log_format main | ||||||
|     '[$time_local][$remote_addr, $http_x_forwarded_for]' |     '[$time_local][$remote_addr, $http_x_forwarded_for, $t1]' | ||||||
|     '[$request_length,$bytes_sent,$request_time]' |     '[$request_length,$bytes_sent,$request_time]' | ||||||
|     '[$status][$request]' |     '[$status][$request]' | ||||||
|     '[$http_user_agent][$http_referer]'; |     '[$http_user_agent][$http_referer]'; | ||||||
| @ -48,6 +48,13 @@ http { | |||||||
|   access_log /dev/stderr main; |   access_log /dev/stderr main; | ||||||
| 
 | 
 | ||||||
|   server { |   server { | ||||||
|  |     set $t1 $remote_addr; | ||||||
|  |     if ($http_x_forwarded_for) | ||||||
|  |     { | ||||||
|  |       set $t1 $http_x_forwarded_for; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|     listen 80; |     listen 80; | ||||||
|     client_max_body_size 50M; |     client_max_body_size 50M; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user