Przeglądaj źródła

[enh] configurable listening http protocol version

Adam Tauber 8 lat temu
rodzic
commit
a98bbefbcf
2 zmienionych plików z 2 dodań i 1 usunięć
  1. 1
    0
      searx/settings.yml
  2. 1
    1
      searx/webapp.py

+ 1
- 0
searx/settings.yml Wyświetl plik

13
     secret_key : "ultrasecretkey" # change this!
13
     secret_key : "ultrasecretkey" # change this!
14
     base_url : False # Set custom base_url. Possible values: False or "https://your.custom.host/location/"
14
     base_url : False # Set custom base_url. Possible values: False or "https://your.custom.host/location/"
15
     image_proxy : False # Proxying image results through searx
15
     image_proxy : False # Proxying image results through searx
16
+    http_protocol_version : "1.0"  # 1.0 and 1.1 are supported
16
 
17
 
17
 ui:
18
 ui:
18
     themes_path : "" # Custom ui themes path - leave it blank if you didn't change
19
     themes_path : "" # Custom ui themes path - leave it blank if you didn't change

+ 1
- 1
searx/webapp.py Wyświetl plik

81
 
81
 
82
 # serve pages with HTTP/1.1
82
 # serve pages with HTTP/1.1
83
 from werkzeug.serving import WSGIRequestHandler
83
 from werkzeug.serving import WSGIRequestHandler
84
-WSGIRequestHandler.protocol_version = "HTTP/1.1"
84
+WSGIRequestHandler.protocol_version = "HTTP/{}".format(settings['server']['http_protocol_version'])
85
 
85
 
86
 static_path, templates_path, themes =\
86
 static_path, templates_path, themes =\
87
     get_themes(settings['ui']['themes_path']
87
     get_themes(settings['ui']['themes_path']