mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-04 03:27:23 -05:00 
			
		
		
		
	caddyhttp: run error (msg) through replacer (#6536)
				
					
				
			* error: run `error` (msg) through replacer Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com> * fix integration test Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com> --------- Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
This commit is contained in:
		
							parent
							
								
									098897bdea
								
							
						
					
					
						commit
						8af646730b
					
				@ -84,7 +84,6 @@ func TestLoadUnorderedJSON(t *testing.T) {
 | 
				
			|||||||
				"servers": {
 | 
									"servers": {
 | 
				
			||||||
					"s_server": {
 | 
										"s_server": {
 | 
				
			||||||
						"listen": [
 | 
											"listen": [
 | 
				
			||||||
							":9443",
 | 
					 | 
				
			||||||
							":9080"
 | 
												":9080"
 | 
				
			||||||
						],
 | 
											],
 | 
				
			||||||
						"routes": [
 | 
											"routes": [
 | 
				
			||||||
 | 
				
			|||||||
@ -105,8 +105,7 @@ func (e StaticError) ServeHTTP(w http.ResponseWriter, r *http.Request, _ Handler
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		statusCode = intVal
 | 
							statusCode = intVal
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						return Error(statusCode, fmt.Errorf("%s", repl.ReplaceKnown(e.Error, "")))
 | 
				
			||||||
	return Error(statusCode, fmt.Errorf("%s", e.Error))
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Interface guard
 | 
					// Interface guard
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user