ocket8888 commented on a change in pull request #4533: Allow json endpoint on 
delivery services
URL: https://github.com/apache/trafficcontrol/pull/4533#discussion_r397297358
 
 

 ##########
 File path: traffic_ops/traffic_ops_golang/routing/routes.go
 ##########
 @@ -288,7 +288,7 @@ func Routes(d ServerData) ([]Route, []RawRoute, 
http.Handler, error) {
                {api.Version{2, 0}, http.MethodGet, `deliveryserviceserver/?$`, 
dsserver.ReadDSSHandlerV14, auth.PrivLevelReadOnly, Authenticated, nil, 
2946145033, noPerlBypass},
                {api.Version{2, 0}, http.MethodPost, `deliveryserviceserver$`, 
dsserver.GetReplaceHandler, auth.PrivLevelOperations, Authenticated, nil, 
229799788, noPerlBypass},
                {api.Version{2, 0}, http.MethodPost, 
`deliveryservices/{xml_id}/servers$`, dsserver.GetCreateHandler, 
auth.PrivLevelOperations, Authenticated, nil, 2428181206, noPerlBypass},
-               {api.Version{2, 0}, http.MethodGet, 
`servers/{id}/deliveryservices$`, 
api.ReadHandler(&dsserver.TODSSDeliveryService{}), auth.PrivLevelReadOnly, 
Authenticated, nil, 233115411, noPerlBypass},
+               {api.Version{2, 0}, http.MethodGet, 
`servers/{id}/deliveryservices?(\/.json)?$`, 
api.ReadHandler(&dsserver.TODSSDeliveryService{}), auth.PrivLevelReadOnly, 
Authenticated, nil, 233115411, noPerlBypass},
 
 Review comment:
   This shouldn't be done in 2.0; our documentation explicitly states that 
`.json` suffixes are no longer supported in that version.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Reply via email to