소스 검색

[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()