This is an automated email from the ASF dual-hosted git repository. mitchell852 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git
commit 2643a88350bef158c1167fd5f7123b3991d711f8 Author: Dewayne Richardson <dewr...@apache.org> AuthorDate: Thu Mar 22 07:58:12 2018 -0600 added cors-http-server.py to help with swagger doc building --- .../swaggerdocs/cors-http-server.py | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/traffic_ops/traffic_ops_golang/swaggerdocs/cors-http-server.py b/traffic_ops/traffic_ops_golang/swaggerdocs/cors-http-server.py new file mode 100755 index 0000000..3c1687f --- /dev/null +++ b/traffic_ops/traffic_ops_golang/swaggerdocs/cors-http-server.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python + + + # 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. + +from SimpleHTTPServer import SimpleHTTPRequestHandler +import BaseHTTPServer + +# +# Simple HTTP server that serves up port 8000 with the CORS header enabled +# +class CORSRequestHandler (SimpleHTTPRequestHandler): + def end_headers (self): + self.send_header('Access-Control-Allow-Origin', '*') + SimpleHTTPRequestHandler.end_headers(self) + +if __name__ == '__main__': + BaseHTTPServer.test(CORSRequestHandler, BaseHTTPServer.HTTPServer) -- To stop receiving notification emails like this one, please contact mitchell...@apache.org.