Skip to content

Commit de46975

Browse files
Delete URL redirection for legacy eventyay-xx websites (#1338)
Those URLs are for logged-in users, not for public search. We don't need to keep them alive. Co-authored-by: Mario Behling <[email protected]>
1 parent b59ae4c commit de46975

File tree

2 files changed

+1
-151
lines changed

2 files changed

+1
-151
lines changed

app/eventyay/multidomain/maindomain_urlconf.py

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
# Ticket-video integration: plugin URLs are auto-included via plugin handler below.
2222
from eventyay.config.urls import common_patterns
23-
from eventyay.multidomain import redirects
2423
from eventyay.multidomain.plugin_handler import plugin_event_urls
2524
from eventyay.presale.urls import (
2625
event_patterns,
@@ -32,40 +31,6 @@
3231
WEBAPP_DIST_DIR = os.path.normpath(os.path.join(BASE_DIR, 'static', 'webapp'))
3332
logger = logging.getLogger(__name__)
3433

35-
EXCLUDED_LEGACY_PREFIXES = (
36-
"common",
37-
"control",
38-
"orga",
39-
"admin",
40-
"api",
41-
"video",
42-
"static",
43-
"media",
44-
)
45-
46-
MATCHED_LEGACY_SUBPATHS = (
47-
"schedule",
48-
"talk",
49-
"speaker",
50-
"featured",
51-
"sneak",
52-
"cfp",
53-
"submit",
54-
"me",
55-
"login",
56-
"logout",
57-
"auth",
58-
"reset",
59-
"invitation",
60-
"online-video",
61-
"widgets",
62-
"static",
63-
"locale",
64-
"sw\\.js",
65-
)
66-
67-
EXCLUDED_LEGACY_PREFIXES_REGEX = "|".join(EXCLUDED_LEGACY_PREFIXES)
68-
MATCHED_LEGACY_SUBPATHS_REGEX = "|".join(MATCHED_LEGACY_SUBPATHS)
6934

7035
class VideoSPAView(View):
7136
def get(self, request, *args, **kwargs):
@@ -270,44 +235,12 @@ def get(self, request, path='', *args, **kwargs):
270235
),
271236
]
272237

273-
# Legacy redirect patterns for backward compatibility
274-
legacy_redirect_patterns = [
275-
# Legacy standalone video SPA at /video
276-
re_path(r'^video/assets/(?P<path>.*)$', VideoAssetView.as_view(), name='video.legacy.assets'),
277-
re_path(
278-
r'^video/(?P<path>[^?]*\.[a-zA-Z0-9._-]+)$',
279-
VideoAssetView.as_view(),
280-
name='video.legacy.assets.file',
281-
),
282-
re_path(r'^video/?$', VideoSPAView.as_view(), name='video.legacy.index'),
283-
# Legacy video URLs: /video/<event_identifier> -> /{organizer}/{event}/video
284-
re_path(
285-
r'^video/(?P<event_identifier>(?!assets)[^/]+)(?:/.*)?$',
286-
redirects.legacy_video_redirect,
287-
name='video.legacy.redirect',
288-
),
289-
# Legacy talk URLs: /<event>/(path) -> /{organizer}/{event}/(path)
290-
# This excludes known top-level namespaces before treating the first segment as an event slug.
291-
re_path(
292-
rf'^(?!(?:{EXCLUDED_LEGACY_PREFIXES_REGEX})/)(?P<event_slug>[^/]+)/({MATCHED_LEGACY_SUBPATHS_REGEX})(?:/|$)',
293-
redirects.legacy_talk_redirect,
294-
name='talk.legacy.redirect',
295-
),
296-
# Legacy event base URL: /<event>/ -> /{organizer}/{event}/
297-
re_path(
298-
rf'^(?!(?:{EXCLUDED_LEGACY_PREFIXES_REGEX})/)(?P<event_slug>[^/]+)/$',
299-
redirects.legacy_talk_redirect,
300-
name='talk.legacy.base.redirect',
301-
),
302-
]
303-
304238
urlpatterns = (
305239
common_patterns
306240
+ storage_patterns
307-
# The plugins patterns must be before legacy_redirect_patterns and presale_patterns_main
241+
# The plugins patterns must be before presale_patterns_main
308242
# to avoid misdetection of plugin prefixes and organizer/event slugs.
309243
+ plugin_patterns
310-
+ legacy_redirect_patterns
311244
+ presale_patterns_main
312245
+ unified_event_patterns
313246
)

app/eventyay/multidomain/redirects.py

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)