Browse Source

[enh] add settings option to set listening address - closes #397

Adam Tauber 9 years ago
parent
commit
d0830d4edf
3 changed files with 4 additions and 1 deletions
  1. 1
    0
      searx/settings.yml
  2. 1
    0
      searx/settings_robot.yml
  3. 2
    1
      searx/webapp.py

+ 1
- 0
searx/settings.yml View File

@@ -1,5 +1,6 @@
1 1
 server:
2 2
     port : 8888
3
+    bind_address : "127.0.0.1" # address to listen on
3 4
     secret_key : "ultrasecretkey" # change this!
4 5
     debug : False # Debug mode, only for development
5 6
     request_timeout : 2.0 # seconds

+ 1
- 0
searx/settings_robot.yml View File

@@ -1,5 +1,6 @@
1 1
 server:
2 2
     port : 11111
3
+    bind_address : 127.0.0.1
3 4
     secret_key : "ultrasecretkey" # change this!
4 5
     debug : False
5 6
     request_timeout : 3.0 # seconds

+ 2
- 1
searx/webapp.py View File

@@ -777,7 +777,8 @@ def run():
777 777
     app.run(
778 778
         debug=settings['server']['debug'],
779 779
         use_debugger=settings['server']['debug'],
780
-        port=settings['server']['port']
780
+        port=settings['server']['port'],
781
+        host=settings['server']['bind_address']
781 782
     )
782 783
 
783 784