-oOpen browser window after starting the server -cSet cache time (in seconds) for cache-control max-age header, e.g. -c10 for 10 seconds (defaults to '3600'). To disable caching, use -c-1. -Uor--utcUse UTC time format in log messages. -Por--proxyProxies all requests which can'...
http.server的处理方法 http.server为python预置库, 只需提供一个RequestHandler给到TCPServer对象。处理跨域核心代码在end_headers中。 importosimportsysimporthttp.serverimportsocketserverclassHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):defend_headers(self): self.send_header('Access-Control-Allow-Origi...
-Uor--utcUse UTC time format in log messages. -Por--proxyProxies all requests which can't be resolved locally to the given url. e.g.: -Phttp://someurl.com -Sor--sslEnable https. -Cor--certPath to ssl cert file (default: cert.pem). -Kor--keyPath to ssl key file (default: ke...
-Uor--utcUse UTC time format in log messages. -Por--proxyProxies all requests which can't be resolved locally to the given url. e.g.: -Phttp://someurl.com -Sor--sslEnable https. -Cor--certPath to ssl cert file (default: cert.pem). -Kor--keyPath to ssl key file (default: ke...