Browse Source

[fix] handle proxied https scheme with uwsgi

Adam Tauber 10 years ago
parent
commit
91f7c031d5
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      searx/webapp.py

+ 3
- 0
searx/webapp.py View File

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