mirror of
				https://github.com/juanfont/headscale.git
				synced 2025-10-28 10:51:44 +01:00 
			
		
		
		
	Fix API router
This commit is contained in:
		
							parent
							
								
									c6eb7be7fb
								
							
						
					
					
						commit
						a4d0efbe8d
					
				
							
								
								
									
										8
									
								
								app.go
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								app.go
									
									
									
									
									
								
							| @ -445,11 +445,9 @@ func (h *Headscale) createRouter(grpcMux *runtime.ServeMux) *mux.Router { | ||||
| 		router.HandleFunc("/bootstrap-dns", h.DERPBootstrapDNSHandler) | ||||
| 	} | ||||
| 
 | ||||
| 	api := router.PathPrefix("/api").Subrouter() | ||||
| 	api.Use(h.httpAuthenticationMiddleware) | ||||
| 	{ | ||||
| 		api.HandleFunc("/v1/*any", grpcMux.ServeHTTP) | ||||
| 	} | ||||
| 	apiRouter := router.PathPrefix("/api").Subrouter() | ||||
| 	apiRouter.Use(h.httpAuthenticationMiddleware) | ||||
| 	apiRouter.PathPrefix("/v1/").HandlerFunc(grpcMux.ServeHTTP) | ||||
| 
 | ||||
| 	router.PathPrefix("/").HandlerFunc(stdoutHandler) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user