mirror of
				https://github.com/r-smith/deceptifeed.git
				synced 2025-11-03 21:53:39 +00:00 
			
		
		
		
	Force HTTP response header casing to WWW-Authenticate
				
					
				
			This change forces the `WWW-Authenticate` casing for the default HTTP response header on the HTTP/HTTPS honeypot servers. Previously, Go automatically converted it to `Www-Authenticate`. This update matches the casing used by most other web servers. The change is intended to reduce the risk of fingerprinting the honeypot server by making it behave more like a typical web server.
This commit is contained in:
		@@ -175,7 +175,7 @@ func handleConnection(cfg *config.Server, customHeaders map[string]string) http.
 | 
			
		||||
			} else {
 | 
			
		||||
				// Serve the default page that prompts the client for basic
 | 
			
		||||
				// authentication.
 | 
			
		||||
				w.Header().Set("WWW-Authenticate", "Basic")
 | 
			
		||||
				w.Header()["WWW-Authenticate"] = []string{"Basic"}
 | 
			
		||||
				w.WriteHeader(http.StatusUnauthorized)
 | 
			
		||||
			}
 | 
			
		||||
		} else {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user