leptos/server_fn
haslersn 001ca5148e
fix: handle cross-origin redirects in server function redirect hook (#2329)
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`).
2024-02-17 13:09:39 -05:00
..
server_fn_macro_default v0.6.0-rc1 2024-01-24 21:35:14 -05:00
src fix: handle cross-origin redirects in server function redirect hook (#2329) 2024-02-17 13:09:39 -05:00
Cargo.toml chore(ci): reduce set of tested features to prevent running out of disk space in server_fn (#2320) 2024-02-16 20:26:26 -05:00
Makefile.toml missing makefiles 2024-01-19 14:16:58 -05:00