From 3fb556c8f171a2321313ca50d6b2e321af594572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20B=C3=B6sche?= Date: Sun, 25 Jan 2026 18:50:02 +0100 Subject: [PATCH] Refactor URL generation in file sharing handlers to remove hash fragment --- b0esche_cloud/lib/main.dart | 8 -------- go_cloud/api | Bin 17123378 -> 17123378 bytes go_cloud/internal/http/routes.go | 8 ++++---- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/b0esche_cloud/lib/main.dart b/b0esche_cloud/lib/main.dart index 4d45645..828abb3 100644 --- a/b0esche_cloud/lib/main.dart +++ b/b0esche_cloud/lib/main.dart @@ -16,15 +16,7 @@ import 'pages/public_file_viewer.dart'; import 'theme/app_theme.dart'; import 'injection.dart'; -import 'package:flutter/foundation.dart' show kIsWeb; -import 'package:web/web.dart' as web; - final GoRouter _router = GoRouter( - initialLocation: kIsWeb - ? (web.window.location.hash.isNotEmpty - ? web.window.location.hash.substring(1) - : '/') - : '/', routes: [ GoRoute(path: '/', builder: (context, state) => const HomePage()), GoRoute( diff --git a/go_cloud/api b/go_cloud/api index f6f90b2087479da4256c32919a9bee8c054536bd..72a193312c30fef1394cd90babcb43f87abef87e 100755 GIT binary patch delta 1333 zcmbWz>0c8B0LJmpK*gwtpvcmaEDcj*Fc=$_ardBdC=f`gjj;j3xC$p^WSI|YNk|}? z7g?5(38F@6iFRmYiJFz2W*Sjy7?q`Y^z<+E;`{RV=GR`=IJjNfj(GdJJeT_{p)u-G z&%TD$6RXR%^m+#kOpDGfc3YkK1##Kw;h~w9%EI)t*};X0`PPK0%}gnDg%p((R!oVRZ}+XS`x?YU zJY|3kltJPpgXIeGmMi5dxmtYW8u_okR{X?Yu9NE}KyHvBa--ZNLuHuUEVsyT36xu9 zgxn^#%Sag|cSw+omOEvPjFoY6mjsJZLL^j75+>ndmI$$kRU&1)+%5OW1i4qDBwAu5 zR^lXH668LCB+5jYB$Fjck|jk_Wr|FdG)b2XxnD9n?7mqSok3P(n8Rwc+8rSdQ;5xJ zvYPBBr^Os%wizw92uF@3EH~F|wAz{$y0eB2iik8tL>g;a+*vYBvgHAJP^QZanJEv6 zO>)F8x#AF~g73UkVaW1O|o28$n&yNR>^8vBWtBuUXXS2 zqP*16;$DBO`+x0j((WGhuBGU61#}q#Jj|M#QVet#2#WV@gdPgd_?RcJ|;dP_7mO20pcKWi1?H^ zOngRsPJBTeA-*KOBEBZRA-*NPBaRZ^6UT@jh~vZw;zy!~_=)HxekOh)P7`y)KKmJ5#eZQw+ v-pauErm>@smUf?*o%&o#KrLazap^NA8y?L9KE%$Dc#tt996`My!bS93; zKGYc(lW{iP+I+$%s9(BmQgUfQu{$Z(;;}`Tr1bfFu7iC5PumiH_A;CAc1nT z+#+>Em)+|Mvf8YUXjh)o<_dSZa>MeX zjR#M?v@(M)V2-XY#4T8Q_E z&BPYsec}V+Lt-n@N^B#x6CV*fh@Hg8#3#fq;!|Qb@fq}H?QqJnc=;zEPZE3;_g#>7N<LWf$?H6Xxoe|i6c%!+xuW8G_4|zJc diff --git a/go_cloud/internal/http/routes.go b/go_cloud/internal/http/routes.go index fba9f52..804082f 100644 --- a/go_cloud/internal/http/routes.go +++ b/go_cloud/internal/http/routes.go @@ -2795,7 +2795,7 @@ func getFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *databas scheme = "http" } host := "www.b0esche.cloud" - fullURL := fmt.Sprintf("%s://%s/#/share/%s", scheme, host, link.Token) + fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token) w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(map[string]interface{}{ @@ -2860,7 +2860,7 @@ func createFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *data scheme = "http" } host := "www.b0esche.cloud" - fullURL := fmt.Sprintf("%s://%s/#/share/%s", scheme, host, link.Token) + fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token) w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(map[string]interface{}{ @@ -3303,7 +3303,7 @@ func getUserFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *dat scheme = "http" } host := "www.b0esche.cloud" - fullURL := fmt.Sprintf("%s://%s/#/share/%s", scheme, host, link.Token) + fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token) w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(map[string]interface{}{ @@ -3365,7 +3365,7 @@ func createUserFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db * scheme = "http" } host := "www.b0esche.cloud" - fullURL := fmt.Sprintf("%s://%s/#/share/%s", scheme, host, link.Token) + fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token) w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(map[string]interface{}{