Browse Source
			
			
			
			
				
		* httpcaddyfile: Ensure handle_path is sorted as equal to handle * httpcaddyfile: Make mutual exclusivity grouping deterministic (I hope) * httpcaddyfile: Add comment linking to the issue being fixed * httpcaddyfile: Typo fix, comment clarity Co-authored-by: Matt Holt <mholt@users.noreply.github.com> * Update caddyconfig/httpcaddyfile/httptype.go Co-authored-by: Matt Holt <mholt@users.noreply.github.com>master
							committed by
							
								 GitHub
								GitHub
							
						
					
				
				 2 changed files with 126 additions and 1 deletions
			
			
		| @ -0,0 +1,105 @@ | |||
| :80 { | |||
| 	handle /api/* { | |||
| 		respond "api" | |||
| 	} | |||
| 
 | |||
| 	handle_path /static/* { | |||
| 		respond "static" | |||
| 	} | |||
| 
 | |||
| 	handle { | |||
| 		respond "handle" | |||
| 	} | |||
| } | |||
| ---------- | |||
| { | |||
| 	"apps": { | |||
| 		"http": { | |||
| 			"servers": { | |||
| 				"srv0": { | |||
| 					"listen": [ | |||
| 						":80" | |||
| 					], | |||
| 					"routes": [ | |||
| 						{ | |||
| 							"group": "group3", | |||
| 							"match": [ | |||
| 								{ | |||
| 									"path": [ | |||
| 										"/static/*" | |||
| 									] | |||
| 								} | |||
| 							], | |||
| 							"handle": [ | |||
| 								{ | |||
| 									"handler": "subroute", | |||
| 									"routes": [ | |||
| 										{ | |||
| 											"handle": [ | |||
| 												{ | |||
| 													"handler": "rewrite", | |||
| 													"strip_path_prefix": "/static" | |||
| 												} | |||
| 											] | |||
| 										}, | |||
| 										{ | |||
| 											"handle": [ | |||
| 												{ | |||
| 													"body": "static", | |||
| 													"handler": "static_response" | |||
| 												} | |||
| 											] | |||
| 										} | |||
| 									] | |||
| 								} | |||
| 							] | |||
| 						}, | |||
| 						{ | |||
| 							"group": "group3", | |||
| 							"match": [ | |||
| 								{ | |||
| 									"path": [ | |||
| 										"/api/*" | |||
| 									] | |||
| 								} | |||
| 							], | |||
| 							"handle": [ | |||
| 								{ | |||
| 									"handler": "subroute", | |||
| 									"routes": [ | |||
| 										{ | |||
| 											"handle": [ | |||
| 												{ | |||
| 													"body": "api", | |||
| 													"handler": "static_response" | |||
| 												} | |||
| 											] | |||
| 										} | |||
| 									] | |||
| 								} | |||
| 							] | |||
| 						}, | |||
| 						{ | |||
| 							"group": "group3", | |||
| 							"handle": [ | |||
| 								{ | |||
| 									"handler": "subroute", | |||
| 									"routes": [ | |||
| 										{ | |||
| 											"handle": [ | |||
| 												{ | |||
| 													"body": "handle", | |||
| 													"handler": "static_response" | |||
| 												} | |||
| 											] | |||
| 										} | |||
| 									] | |||
| 								} | |||
| 							] | |||
| 						} | |||
| 					] | |||
| 				} | |||
| 			} | |||
| 		} | |||
| 	} | |||
| } | |||
					Loading…
					
					
				
		Reference in new issue