<script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.2.min.js"><\/script>')</script>
127.0.0.1 ajax.googleapis.com
#-*- coding: utf-8 -*- import SocketServer import SimpleHTTPServer import urllib import os PORT = 80 class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler): def do_GET(self): if '/ajax/libs/' in self.path: self.path = self.path.replace('/ajax/libs/','http://yastatic.net/') self.copyfile(urllib.urlopen(self.path), self.wfile) if os.name == 'posix': httpd = SocketServer.ForkingTCPServer(('', PORT), Proxy) else: httpd = SocketServer.ThreadingTCPServer(('', PORT), Proxy) print "serving at port", PORT httpd.serve_forever()
Source: https://habr.com/ru/post/250663/
All Articles