mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-10-31 02:27:19 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			77 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			77 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| (snippet) {
 | |
| 	header {
 | |
| 		{blocks.foo}
 | |
| 	}
 | |
| 	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": {
 | |
| 															"Foo": [
 | |
| 																"a"
 | |
| 															]
 | |
| 														}
 | |
| 													}
 | |
| 												},
 | |
| 												{
 | |
| 													"handler": "headers",
 | |
| 													"response": {
 | |
| 														"set": {
 | |
| 															"Bar": [
 | |
| 																"b"
 | |
| 															]
 | |
| 														}
 | |
| 													}
 | |
| 												}
 | |
| 											]
 | |
| 										}
 | |
| 									]
 | |
| 								}
 | |
| 							],
 | |
| 							"terminal": true
 | |
| 						}
 | |
| 					]
 | |
| 				}
 | |
| 			}
 | |
| 		}
 | |
| 	}
 | |
| }
 |