From d8d908d4a65132231c11b7b95a7f363e31486f74 Mon Sep 17 00:00:00 2001 From: daniel-c-harvey Date: Tue, 16 Jun 2026 18:43:56 -0400 Subject: [PATCH 1/2] fix(public): move UseStatusCodePagesWithReExecute before UseAntiforgery to fix 404 re-execution antiforgery error --- DeepDrftPublic/Program.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/DeepDrftPublic/Program.cs b/DeepDrftPublic/Program.cs index 8add77d..64f8aa0 100644 --- a/DeepDrftPublic/Program.cs +++ b/DeepDrftPublic/Program.cs @@ -100,6 +100,10 @@ app.Use(async (context, next) => await next(); }); +// StatusCodePages must sit upstream of UseAntiforgery so that re-executed requests +// (e.g. /404) flow through the antiforgery middleware before reaching the endpoint. +app.UseStatusCodePagesWithReExecute("/404", createScopeForStatusCodePages: true); + // Antiforgery is required by Blazor form handling. Authentication / authorization // middleware is intentionally absent — this host is fully anonymous. app.UseAntiforgery(); @@ -144,7 +148,4 @@ app.MapRazorComponents() .AddInteractiveWebAssemblyRenderMode() .AddAdditionalAssemblies(typeof(DeepDrftPublic.Client._Imports).Assembly); -app.UseStatusCodePagesWithReExecute("/404", createScopeForStatusCodePages: true); - - app.Run(); From c926937694c53aeaf67f363b3630ae4164861757 Mon Sep 17 00:00:00 2001 From: daniel-c-harvey Date: Tue, 16 Jun 2026 18:58:32 -0400 Subject: [PATCH 2/2] =?UTF-8?q?fix(share):=20correct=20share=20URLs=20for?= =?UTF-8?q?=20session/mix=20detail=20pages=20=E2=80=94=20release=20mode=20?= =?UTF-8?q?+=20/tracks/=20plural?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DeepDrftPublic.Client/Controls/SharePopover.razor.cs | 2 +- DeepDrftPublic.Client/Pages/MixDetail.razor | 9 ++++++++- DeepDrftPublic.Client/Pages/SessionDetail.razor | 10 ++++------ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/DeepDrftPublic.Client/Controls/SharePopover.razor.cs b/DeepDrftPublic.Client/Controls/SharePopover.razor.cs index 268300d..84f1912 100644 --- a/DeepDrftPublic.Client/Controls/SharePopover.razor.cs +++ b/DeepDrftPublic.Client/Controls/SharePopover.razor.cs @@ -54,7 +54,7 @@ public partial class SharePopover : ComponentBase, IDisposable ? $"{Navigation.BaseUri.TrimEnd('/')}{ReleaseRoutes.DetailHref(ReleaseEntryKey!, ReleaseMedium)}" : TrackUrl; - private string TrackUrl => $"{Navigation.BaseUri}track/{EntryKey}"; + private string TrackUrl => $"{Navigation.BaseUri}tracks/{EntryKey}"; private string EmbedSnippet => $""""""; diff --git a/DeepDrftPublic.Client/Pages/MixDetail.razor b/DeepDrftPublic.Client/Pages/MixDetail.razor index 79a4178..6aaaf27 100644 --- a/DeepDrftPublic.Client/Pages/MixDetail.razor +++ b/DeepDrftPublic.Client/Pages/MixDetail.razor @@ -46,7 +46,8 @@ else Track="@ViewModel.Track" BackHref="/mixes" BackLabel="All mixes" - ShowMeta="@(hasGenre || hasDate)"> + ShowMeta="@(hasGenre || hasDate)" + ShowShareRow="false"> @* Lava-lamp button top-right, across from the back link. Toggles the INLINE seven-knob control bar that animates open/closed in place below it (lava reframe §7b) — not a @@ -100,6 +101,12 @@ else } + + @* Release-mode share: copies the canonical /mixes/{entryKey} URL, not a single track (§3b). *@ +
+ +
+
diff --git a/DeepDrftPublic.Client/Pages/SessionDetail.razor b/DeepDrftPublic.Client/Pages/SessionDetail.razor index f23b4c6..5862b9d 100644 --- a/DeepDrftPublic.Client/Pages/SessionDetail.razor +++ b/DeepDrftPublic.Client/Pages/SessionDetail.razor @@ -87,12 +87,10 @@ else } - @if (ViewModel.Track is not null) - { -
- -
- } + @* Release-mode share: copies the canonical /sessions/{entryKey} URL, not a single track (§3b). *@ +
+ +
@* Bottom overlay: cover thumbnail, title/artist, and the play affordance in one row. *@