You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2019/02/05 16:52:23 UTC

[GitHub] ocket8888 commented on a change in pull request #2278: Add TO Go caches/stats endpoint

ocket8888 commented on a change in pull request #2278: Add TO Go caches/stats endpoint
URL: https://github.com/apache/trafficcontrol/pull/2278#discussion_r253951742
 
 

 ##########
 File path: traffic_ops/traffic_ops_golang/routes.go
 ##########
 @@ -103,6 +104,8 @@ func Routes(d ServerData) ([]Route, []RawRoute, http.Handler, error) {
 		{1.1, http.MethodPost, `asns/?$`, api.CreateHandler(asn.GetTypeSingleton()), auth.PrivLevelOperations, Authenticated, nil},
 		{1.1, http.MethodDelete, `asns/{id}$`, api.DeleteHandler(asn.GetTypeSingleton()), auth.PrivLevelOperations, Authenticated, nil},
 
+		{1.1, http.MethodGet, `caches/stats/?(\.json)?$`, cachesstats.Get, auth.PrivLevelReadOnly, Authenticated, nil},
 
 Review comment:
   I don't think this is unique to this endpoint, but this will allow me to `GET` `/api/1.x/caches/stats/.json`. I checked and it seems that the Perl allows this, so maybe for that reason alone we don't want to change it, but it's weird.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services