#!/usr/bin/env python2
from SimpleHTTPServer import SimpleHTTPRequestHandler
import BaseHTTPServer

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 )
try:
    from http.server import SimpleHTTPRequestHandler
    import http.server as BaseHTTPServer
except ImportError:
    from SimpleHTTPServer import SimpleHTTPRequestHandler
    import BaseHTTPServer


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 )
Add python3 support to stop Steve whinging
Add python3 support to stop Steve whinging
