mirror of
https://github.com/leptos-rs/leptos
synced 2024-09-20 14:32:00 +00:00
001ca5148e
In client-side navigation we now handle redirects returned from server functions by resolving the location against the current origin as a base. The base is only relevant if the location doesn't already include an origin. This fixes cross-origin redirects. Note: in order to handle redirects in the same way as the browser would handle them, we need to use the server function's URL (typically `<origin>/api/something`) as a base. I leave this as a TODO for a future leptos version, because it probably requires changing the signature of the `server_fn` redirect hook. In order to not be affected by a future breaking change, users should already start making sure that their redirect locations either include an origin or at least start with a single slash (e.g. `Location: /foo`). |
||
---|---|---|
.. | ||
server_fn_macro_default | ||
src | ||
Cargo.toml | ||
Makefile.toml |