Fix preview when SECURE_SSL_REDIRECT = True.

Fix #3048.
pull/2875/merge
Aymeric Augustin 2016-10-05 12:07:13 +02:00 zatwierdzone przez Matt Westcott
rodzic b4a4e5eb92
commit a108f16eff
3 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -34,6 +34,7 @@ Changelog
* Fix: Images / documents pagination now preserves GET parameters (Bojan Mihelac)
* Fix: Wagtail's UserProfile model now sets a related_name of ``wagtail_userprofile`` to avoid naming collisions with other user profile models (Matt Westcott)
* Fix: Non-text content is now preserved when adding or editing a link within rich text (Matt Westcott)
* Fix: Fixed preview when `SECURE_SSL_REDIRECT = True` (Aymeric Augustin)
1.6.3 (30.09.2016)

Wyświetl plik

@ -69,6 +69,7 @@ Bug fixes
* Images / documents pagination now preserves GET parameters (Bojan Mihelac)
* Wagtail's UserProfile model now sets a related_name of ``wagtail_userprofile`` to avoid naming collisions with other user profile models (Matt Westcott)
* Non-text content is now preserved when adding or editing a link within rich text (Matt Westcott)
* Fixed preview when ``SECURE_SSL_REDIRECT = True`` (Aymeric Augustin)
Upgrade considerations

Wyświetl plik

@ -1229,6 +1229,8 @@ class Page(six.with_metaclass(PageBase, AbstractPage, index.Indexed, Clusterable
'REMOTE_ADDR', 'HTTP_X_FORWARDED_FOR', 'HTTP_COOKIE', 'HTTP_USER_AGENT',
'wsgi.version', 'wsgi.multithread', 'wsgi.multiprocess', 'wsgi.run_once',
]
if settings.SECURE_PROXY_SSL_HEADER:
HEADERS_FROM_ORIGINAL_REQUEST.append(settings.SECURE_PROXY_SSL_HEADER[0])
if original_request:
for header in HEADERS_FROM_ORIGINAL_REQUEST:
if header in original_request.META: