ocket8888 commented on a change in pull request #3023: WIP Supported routes
fetch
URL: https://github.com/apache/trafficcontrol/pull/3023#discussion_r233238234
##########
File path: traffic_ops/traffic_ops_golang/routes.go
##########
@@ -424,6 +424,17 @@ func Routes(d ServerData) ([]Route, []RawRoute,
http.Handler, error) {
{http.MethodGet, `tools/write_crconfig/{cdn}/?$`,
crconfig.SnapshotOldGUIHandler, auth.PrivLevelOperations, Authenticated, nil},
// DEPRECATED - use GET /api/1.2/cdns/{cdn}/snapshot
{http.MethodGet, `CRConfig-Snapshots/{cdn}/CRConfig.json?$`,
crconfig.SnapshotOldGetHandler, auth.PrivLevelReadOnly, Authenticated, nil},
+
+ // The '/api' endpoint, that tells clients what routes are
available under /api/1.x
+ {http.MethodGet, `api/?$`, api.AvailableRoutesHandler, 0,
false, nil},
+ {http.MethodHead, `api/?$`,
api.AvailableRoutesBadMethodHandler, 0, false, nil},
Review comment:
See [my other
comment](https://github.com/apache/trafficcontrol/pull/3023#discussion_r233230570)
regarding the mapping between routes and methods
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services