File tree 2 files changed +11
-9
lines changed
2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -249,18 +249,21 @@ type FederationResponse struct {
249
249
}
250
250
251
251
// caHandler is the type used to implement the different CA HTTP endpoints.
252
- type caHandler struct {
253
- Authority Authority
252
+ type caHandler struct {}
253
+
254
+ // Route configures the http request router.
255
+ func (h * caHandler ) Route (r Router ) {
256
+ Route (r )
254
257
}
255
258
256
259
// New creates a new RouterHandler with the CA endpoints.
260
+ //
261
+ // Deprecated: Use api.Route(r Router)
257
262
func New (auth Authority ) RouterHandler {
258
- return & caHandler {
259
- Authority : auth ,
260
- }
263
+ return & caHandler {}
261
264
}
262
265
263
- func ( h * caHandler ) Route (r Router ) {
266
+ func Route (r Router ) {
264
267
r .MethodFunc ("GET" , "/version" , Version )
265
268
r .MethodFunc ("GET" , "/health" , Health )
266
269
r .MethodFunc ("GET" , "/root/{sha}" , Root )
Original file line number Diff line number Diff line change @@ -170,10 +170,9 @@ func (ca *CA) Init(cfg *config.Config) (*CA, error) {
170
170
insecureHandler := http .Handler (insecureMux )
171
171
172
172
// Add regular CA api endpoints in / and /1.0
173
- routerHandler := api .New (auth )
174
- routerHandler .Route (mux )
173
+ api .Route (mux )
175
174
mux .Route ("/1.0" , func (r chi.Router ) {
176
- routerHandler .Route (r )
175
+ api .Route (r )
177
176
})
178
177
179
178
//Add ACME api endpoints in /acme and /1.0/acme
You can’t perform that action at this time.
0 commit comments