Skip to content

Instantly share code, notes, and snippets.

View mgillam's full-sized avatar

Mic mgillam

View GitHub Profile
@mgillam
mgillam / cors_server.py
Created November 15, 2016 01:15 — forked from enjalot/cors_server.py
Allow CORS with python simple http server
import SimpleHTTPServer
class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def send_head(self):
"""Common code for GET and HEAD commands.
This sends the response code and MIME headers.
Return value is either a file object (which has to be copied
to the outputfile by the caller unless the command was HEAD,
and must be closed by the caller under all circumstances), or

Keybase proof

I hereby claim:

  • I am mgillam on github.
  • I am mic_wg (https://keybase.io/mic_wg) on keybase.
  • I have a public key ASBx6jTmJTftj7dbmRGPNx4dWWaj4Wq_cvFvjoHqy1EGPAo

To claim this, I am signing this object: