mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-03 19:17:29 -05:00 
			
		
		
		
	* httpcaddyfile: First pass at implementing server options * httpcaddyfile: Add listener wrapper support * httpcaddyfile: Sort sbaddrs to make adapt output more deterministic * httpcaddyfile: Add server options adapt tests * httpcaddyfile: Windows line endings lol * caddytest: More windows line endings lol (sorry Matt) * Update caddyconfig/httpcaddyfile/serveroptions.go Co-authored-by: Matt Holt <mholt@users.noreply.github.com> * httpcaddyfile: Reword listener address "matcher" * Apply suggestions from code review Co-authored-by: Matt Holt <mholt@users.noreply.github.com> * httpcaddyfile: Deprecate experimental_http3 option (moved to servers) * httpcaddyfile: Remove validation step, no longer needed Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
		
			
				
	
	
		
			52 lines
		
	
	
		
			751 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			751 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
:80
 | 
						|
handle_path /api/v1/* {
 | 
						|
	respond "API v1"
 | 
						|
}
 | 
						|
----------
 | 
						|
{
 | 
						|
	"apps": {
 | 
						|
		"http": {
 | 
						|
			"servers": {
 | 
						|
				"srv0": {
 | 
						|
					"listen": [
 | 
						|
						":80"
 | 
						|
					],
 | 
						|
					"routes": [
 | 
						|
						{
 | 
						|
							"match": [
 | 
						|
								{
 | 
						|
									"path": [
 | 
						|
										"/api/v1/*"
 | 
						|
									]
 | 
						|
								}
 | 
						|
							],
 | 
						|
							"handle": [
 | 
						|
								{
 | 
						|
									"handler": "subroute",
 | 
						|
									"routes": [
 | 
						|
										{
 | 
						|
											"handle": [
 | 
						|
												{
 | 
						|
													"handler": "rewrite",
 | 
						|
													"strip_path_prefix": "/api/v1"
 | 
						|
												}
 | 
						|
											]
 | 
						|
										},
 | 
						|
										{
 | 
						|
											"handle": [
 | 
						|
												{
 | 
						|
													"body": "API v1",
 | 
						|
													"handler": "static_response"
 | 
						|
												}
 | 
						|
											]
 | 
						|
										}
 | 
						|
									]
 | 
						|
								}
 | 
						|
							]
 | 
						|
						}
 | 
						|
					]
 | 
						|
				}
 | 
						|
			}
 | 
						|
		}
 | 
						|
	}
 | 
						|
} |