coyotte508 HF staff commited on
Commit
2d350d7
β€’
1 Parent(s): a77bb43

πŸ› Remove query param from referer during redirect

Browse files
Files changed (1) hide show
  1. src/routes/+layout.server.ts +1 -1
src/routes/+layout.server.ts CHANGED
@@ -24,7 +24,7 @@ export const load: LayoutServerLoad = async ({ locals, depends, url, request })
24
  );
25
  }
26
 
27
- throw redirect(303, request.headers.get("referer") || base || "/");
28
  }
29
 
30
  const settings = await collections.settings.findOne({ sessionId: locals.sessionId });
 
24
  );
25
  }
26
 
27
+ throw redirect(303, request.headers.get("referer")?.split("?")[0] || base || "/");
28
  }
29
 
30
  const settings = await collections.settings.findOne({ sessionId: locals.sessionId });