Try to use the presense of http to mark a connection as insecure rather than using the presense of https to make it as secure.
This commit is contained in:
parent
504bc7e04e
commit
2ff96ffd87
1 changed files with 3 additions and 3 deletions
|
@ -7,11 +7,11 @@ WSGIPassAuthorization On
|
|||
WSGIChunkedRequest On
|
||||
|
||||
<VirtualHost *:80>
|
||||
SetEnvIf X-Forwarded-Proto https HTTPS=1
|
||||
SetEnvIf X-Forwarded-Proto !http HTTPS=1
|
||||
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTP:X-Forwarded-Proto} !https
|
||||
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=permanent]
|
||||
RewriteCond %{HTTP:X-Forwarded-Proto} http
|
||||
RewriteRule !/status https://%{SERVER_NAME}%{REQUEST_URI} [L,R=permanent]
|
||||
|
||||
Alias /static /opt/python/current/app/static/
|
||||
<Directory /opt/python/current/app/>
|
||||
|
|
Reference in a new issue