mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-03 19:17:29 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			78 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			78 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
:8881 {
 | 
						|
	route {
 | 
						|
		handle /foo/* {
 | 
						|
			respond "Foo"
 | 
						|
		}
 | 
						|
		handle {
 | 
						|
			respond "Bar"
 | 
						|
		}
 | 
						|
	}
 | 
						|
}
 | 
						|
----------
 | 
						|
{
 | 
						|
	"apps": {
 | 
						|
		"http": {
 | 
						|
			"servers": {
 | 
						|
				"srv0": {
 | 
						|
					"listen": [
 | 
						|
						":8881"
 | 
						|
					],
 | 
						|
					"routes": [
 | 
						|
						{
 | 
						|
							"handle": [
 | 
						|
								{
 | 
						|
									"handler": "subroute",
 | 
						|
									"routes": [
 | 
						|
										{
 | 
						|
											"group": "group2",
 | 
						|
											"handle": [
 | 
						|
												{
 | 
						|
													"handler": "subroute",
 | 
						|
													"routes": [
 | 
						|
														{
 | 
						|
															"handle": [
 | 
						|
																{
 | 
						|
																	"body": "Foo",
 | 
						|
																	"handler": "static_response"
 | 
						|
																}
 | 
						|
															]
 | 
						|
														}
 | 
						|
													]
 | 
						|
												}
 | 
						|
											],
 | 
						|
											"match": [
 | 
						|
												{
 | 
						|
													"path": [
 | 
						|
														"/foo/*"
 | 
						|
													]
 | 
						|
												}
 | 
						|
											]
 | 
						|
										},
 | 
						|
										{
 | 
						|
											"group": "group2",
 | 
						|
											"handle": [
 | 
						|
												{
 | 
						|
													"handler": "subroute",
 | 
						|
													"routes": [
 | 
						|
														{
 | 
						|
															"handle": [
 | 
						|
																{
 | 
						|
																	"body": "Bar",
 | 
						|
																	"handler": "static_response"
 | 
						|
																}
 | 
						|
															]
 | 
						|
														}
 | 
						|
													]
 | 
						|
												}
 | 
						|
											]
 | 
						|
										}
 | 
						|
									]
 | 
						|
								}
 | 
						|
							]
 | 
						|
						}
 | 
						|
					]
 | 
						|
				}
 | 
						|
			}
 | 
						|
		}
 | 
						|
	}
 | 
						|
} |