rob05c commented on a change in pull request #3023: WIP Supported routes fetch
URL: https://github.com/apache/trafficcontrol/pull/3023#discussion_r233222087
 
 

 ##########
 File path: traffic_ops/traffic_ops_golang/api/api_route.go
 ##########
 @@ -0,0 +1,148 @@
+package api
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import "bytes"
+import "net/http"
+import "regexp"
+import "strconv"
+//import trops 
"github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang"
+import log "github.com/apache/trafficcontrol/lib/go-log"
+
+// todo - make the version string modular and accessible everywhere
+const ServerString = "Traffic Operations/3.0.0";
 
 Review comment:
   `X-Server-Name` intentionally does not serve the version, because it's a 
potential security vulnerability. Exposing the code version of a server gives 
attackers information which they can use to target specific exploits in a known 
version.
   
   `traffic_ops_golang` serves `X-Server-Name` instead of `Server` at the 
moment, so as not to override Perl's `Server` header, to make debugging easier. 
The intention is to serve `Server` once Perl goes away.

----------------------------------------------------------------
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

Reply via email to