소스 검색

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

Adam Tauber 9 년 전
부모
커밋
d0830d4edf
3개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    0
      searx/settings.yml
  2. 1
    0
      searx/settings_robot.yml
  3. 2
    1
      searx/webapp.py

+ 1
- 0
searx/settings.yml 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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