瀏覽代碼

[fix] handle proxied https scheme with uwsgi

Adam Tauber 10 年之前
父節點
當前提交
91f7c031d5
共有 1 個檔案被更改,包括 3 行新增0 行删除
  1. 3
    0
      searx/webapp.py

+ 3
- 0
searx/webapp.py 查看文件

@@ -29,6 +29,7 @@ import hashlib
29 29
 
30 30
 from datetime import datetime, timedelta
31 31
 from urllib import urlencode
32
+from werkzeug.contrib.fixers import ProxyFix
32 33
 from flask import (
33 34
     Flask, request, render_template, url_for, Response, make_response,
34 35
     redirect, send_from_directory
@@ -652,6 +653,8 @@ def run():
652 653
 
653 654
 application = app
654 655
 
656
+app.wsgi_app = ProxyFix(application.wsgi_app)
657
+
655 658
 
656 659
 if __name__ == "__main__":
657 660
     run()