mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-04 03:27:23 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			83 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			83 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
(snippet) {
 | 
						|
	header {
 | 
						|
		{blocks.bar}
 | 
						|
	}
 | 
						|
	import sub_snippet {
 | 
						|
		bar {
 | 
						|
			{blocks.foo}
 | 
						|
		}
 | 
						|
	}
 | 
						|
}
 | 
						|
(sub_snippet) {
 | 
						|
	header {
 | 
						|
		{blocks.bar}
 | 
						|
	}
 | 
						|
}
 | 
						|
example.com {
 | 
						|
	import snippet {
 | 
						|
		foo {
 | 
						|
			foo a
 | 
						|
		}
 | 
						|
		bar {
 | 
						|
			bar b
 | 
						|
		}
 | 
						|
	}
 | 
						|
}
 | 
						|
----------
 | 
						|
{
 | 
						|
	"apps": {
 | 
						|
		"http": {
 | 
						|
			"servers": {
 | 
						|
				"srv0": {
 | 
						|
					"listen": [
 | 
						|
						":443"
 | 
						|
					],
 | 
						|
					"routes": [
 | 
						|
						{
 | 
						|
							"match": [
 | 
						|
								{
 | 
						|
									"host": [
 | 
						|
										"example.com"
 | 
						|
									]
 | 
						|
								}
 | 
						|
							],
 | 
						|
							"handle": [
 | 
						|
								{
 | 
						|
									"handler": "subroute",
 | 
						|
									"routes": [
 | 
						|
										{
 | 
						|
											"handle": [
 | 
						|
												{
 | 
						|
													"handler": "headers",
 | 
						|
													"response": {
 | 
						|
														"set": {
 | 
						|
															"Bar": [
 | 
						|
																"b"
 | 
						|
															]
 | 
						|
														}
 | 
						|
													}
 | 
						|
												},
 | 
						|
												{
 | 
						|
													"handler": "headers",
 | 
						|
													"response": {
 | 
						|
														"set": {
 | 
						|
															"Foo": [
 | 
						|
																"a"
 | 
						|
															]
 | 
						|
														}
 | 
						|
													}
 | 
						|
												}
 | 
						|
											]
 | 
						|
										}
 | 
						|
									]
 | 
						|
								}
 | 
						|
							],
 | 
						|
							"terminal": true
 | 
						|
						}
 | 
						|
					]
 | 
						|
				}
 | 
						|
			}
 | 
						|
		}
 | 
						|
	}
 | 
						|
}
 |