Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4267)

Unified Diff: chrome/common/extensions/docs/server2/preview.py

Issue 1086073002: Start the documentation preview server on localhost only by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/server2/preview.py
diff --git a/chrome/common/extensions/docs/server2/preview.py b/chrome/common/extensions/docs/server2/preview.py
index 777f6dced90051cb7aa65f6f82e201ec00e4f1ba..e19e13e346868ce09788a50035935b536d35335d 100755
--- a/chrome/common/extensions/docs/server2/preview.py
+++ b/chrome/common/extensions/docs/server2/preview.py
@@ -65,6 +65,8 @@ if __name__ == '__main__':
parser = optparse.OptionParser(
description='Runs a server to preview the extension documentation.',
usage='usage: %prog [option]...')
+ parser.add_option('-a', '--address', default='127.0.0.1',
+ help='the local interface address to bind the server to')
parser.add_option('-p', '--port', default='8000',
help='port to run the server on')
parser.add_option('-r', '--render', default='',
@@ -126,7 +128,7 @@ if __name__ == '__main__':
print('')
logging.getLogger().setLevel(logging.INFO)
- server = HTTPServer(('', int(opts.port)), _RequestHandler)
+ server = HTTPServer((opts.address, int(opts.port)), _RequestHandler)
try:
server.serve_forever()
finally:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698