mirror of
https://github.com/boostorg/website-v2.git
synced 2026-01-19 04:42:17 +00:00
Add libraries redirect (#1770)
This commit is contained in:
@@ -388,20 +388,11 @@ if LOCAL_DEVELOPMENT:
|
||||
]
|
||||
|
||||
|
||||
# Allow Allauth to use HTTPS when deployed but HTTP for local dev
|
||||
SECURE_PROXY_SSL_HEADER_NAME = env("SECURE_PROXY_SSL_HEADER_NAME", default=None)
|
||||
SECURE_PROXY_SSL_HEADER_VALUE = env("SECURE_PROXY_SSL_HEADER_VALUE", default=None)
|
||||
SECURE_SSL_REDIRECT = env("SECURE_SSL_REDIRECT", default=False)
|
||||
|
||||
if not LOCAL_DEVELOPMENT:
|
||||
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
|
||||
|
||||
if all(
|
||||
[SECURE_PROXY_SSL_HEADER_NAME, SECURE_PROXY_SSL_HEADER_VALUE, SECURE_SSL_REDIRECT]
|
||||
):
|
||||
SECURE_PROXY_SSL_HEADER = (
|
||||
SECURE_PROXY_SSL_HEADER_NAME,
|
||||
SECURE_PROXY_SSL_HEADER_VALUE,
|
||||
"HTTP_X_FORWARDED_PROTO",
|
||||
ACCOUNT_DEFAULT_HTTP_PROTOCOL,
|
||||
)
|
||||
|
||||
# Admin banner configuration
|
||||
|
||||
@@ -32,6 +32,7 @@ from core.views import (
|
||||
StaticContentTemplateView,
|
||||
UserGuideTemplateView,
|
||||
BoostDevelopmentView,
|
||||
ModernizedDocsView,
|
||||
)
|
||||
from libraries.api import LibrarySearchView
|
||||
from libraries.views import (
|
||||
@@ -345,6 +346,11 @@ urlpatterns = (
|
||||
),
|
||||
# Internal functions
|
||||
path("internal/clear-cache/", ClearCacheView.as_view(), name="clear-cache"),
|
||||
path(
|
||||
"internal/modernized-docs/<path:content_path>",
|
||||
ModernizedDocsView.as_view(),
|
||||
name="modernized_docs",
|
||||
),
|
||||
]
|
||||
+ [
|
||||
# Redirects for old boost.org urls.
|
||||
|
||||
Reference in New Issue
Block a user