Replace nginx.conf try_files for /$lang/index.html with rewrite (fixes #250)
This commit is contained in:
		
							parent
							
								
									f982161008
								
							
						
					
					
						commit
						80552fcd78
					
				@ -33,13 +33,11 @@
 | 
			
		||||
 | 
			
		||||
		# fallback for all URLs i.e. /address/foo /tx/foo /block/000
 | 
			
		||||
		location / {
 | 
			
		||||
			#return 302 https://mempool.space/$request_uri;
 | 
			
		||||
			try_files /$lang/$uri /$lang/$uri/ $uri $uri/ /en-US/$uri @index;
 | 
			
		||||
# /$lang/index.html /en-US/index.html =404;
 | 
			
		||||
			try_files /$lang/$uri /$lang/$uri/ $uri $uri/ /en-US/$uri @index-redirect;
 | 
			
		||||
		}
 | 
			
		||||
		location @index {
 | 
			
		||||
			add_header Cache-Control must-revalidate;
 | 
			
		||||
			try_files /$lang/index.html /en-US/index.html =404;
 | 
			
		||||
		location @index-redirect {
 | 
			
		||||
			add_header vary accept-language;
 | 
			
		||||
			rewrite (.*) /$lang/index.html;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		# location block using regex are matched in order
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user