Commit Graph
11 Commits
Author SHA1 Message Date
Reed von Redwitz 5ec06350e2 fix: allow multiple set-cookie headers to be set before render (#2357)
closes #2346

The primary issue was the snippet `headers[key] = value`. This caused
only one `set-cookie` to make it through. Switching to a `Headers`
object allowed me to use `append` when appropriate, allowing for
multiple `set-cookie` entries.

I also cleaned up one of the tests to make use of steps, because I
originally broke it and couldn't immediately tell which part was
failing.
2024-03-12 12:04:42 +01:00
Marvin Hagemeister 9f81806c6e fix: __FRSH_STATE potentially being overwritten by user code (#2256)
As outlined in https://github.com/denoland/fresh/issues/2254 it was
possible to overwrite the script tag that is used by Fresh to pass
island props from the server to the client. This could be done by
injecting raw HTML via `dangerouslySetInnerHTML` and simply using the
same id that Fresh was using.

With this PR we generate a unique id per render that cannot be guessed
anymore. It's composed of `__FRSH_STATE_<uuid>`
2024-01-15 19:41:12 +01:00
Reed von RedwitzandMarvin Hagemeister ad33501692 chore: remove $fresh from import statements (#2079)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-11-28 16:43:50 +00:00
Marvin Hagemeister 9d5e916e4c fix: invalid identifier in manifest (#2070) 2023-11-27 11:20:40 +01:00
Marvin Hagemeister 0961e775db feat: add support for jsx precompile (#2035) 2023-11-13 12:06:55 +01:00
Marvin Hagemeister 33cc4c7866 fix: head text nodes rendered into body (#2015) 2023-11-06 11:45:33 +01:00
Reed von Redwitz da90d92ebd chore: bump deps (#2000) 2023-11-03 16:52:54 +01:00
Marvin Hagemeister bb8921ac85 fix: ctx.render headers not working (#1927) 2023-10-12 23:30:18 +02:00
Asher Gomez 6ddef91d95 refactor: replace references of options with config (#1903) 2023-10-11 09:25:03 +02:00
Asher Gomez d5659a41ac fix: flaky doesn't leak data across renderers test (#1901)
Using `createHandler()` is simpler than starting a server and fetching a
page. `createHandler()` avoids unnecessary network requests, which can
be flaky when you only need to analyse parts of the returned request. I
think we should push for more use of `createHandler()` and only start a
server as a last resort.

This closes #1896, or rather the particular test mentioned there, but
other tests involving TCP connections can still occur. Again, their
remedy is to use `createHandler()` instead of starting a server.
2023-10-11 10:04:33 +11:00
Marvin Hagemeister f67ec8520f fix: render state not unique per render (#1638) 2023-08-16 16:30:16 +02:00