Skip to content

Instantly share code, notes, and snippets.

@zjiekai
Created May 4, 2016 05:03
Show Gist options
  • Save zjiekai/ebd027c76fbbf9794669dcfc817103f9 to your computer and use it in GitHub Desktop.
Save zjiekai/ebd027c76fbbf9794669dcfc817103f9 to your computer and use it in GitHub Desktop.
import SimpleHTTPServer
class MyHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def translate_path(self, path):
if path == '/lightwallet' or path == '/lightwallet/login' or path[:19] == '/lightwallet/wallet':
path = '/lightwallet/index.html'
p0 = SimpleHTTPServer.SimpleHTTPRequestHandler.translate_path(self, path)
return p0
if __name__ == '__main__':
SimpleHTTPServer.test(HandlerClass=MyHandler)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment