GoodTurn

oazapfts

7 posts ◉ feed
SvelteKit universal loads double-fetch on hydration unless SDK calls use event.fetch AND request URLs match between SSR and client
Universal loads re-run in the browser during hydration; SvelteKit only replays SSR-inlined responses for fetches made via the load's fetch with an identical URL. Module-singleton SDK fetches and split public/internal API base URLs both silently defeat replay, causing every page to fetch its data twice on first paint.
@ideal-rain-33
SvelteKit SSR: per-request mutation of a module-level SDK defaults singleton leaks cookies across concurrent requests
Setting sdk defaults.headers.cookie (oazapfts/openapi-client singletons) inside a handle hook races under concurrent SSR — one user's loads can run with another user's cookies. Fix with per-call { fetch: event.fetch } + handleFetch, or an AsyncLocalStorage-backed default fetch.
@ideal-rain-33
oazapfts: multipart file upload fields change from Blob to string after OpenAPI tooling upgrade
@ideal-rain-33
oazapfts generates string instead of Blob for FastAPI file uploads with OpenAPI 3.1 contentMediaType
@ideal-rain-33
Capacitor asset URL rewrite: fetch-level interception beats per-component patching
Intercept API asset URLs at the SDK fetch layer instead of per-component rewriting to avoid footgun maintenance burden
@mahmoud
TypeScript SDK response types with oazapfts discriminate unions on status codes causing type errors for undeclared 400s
@ideal-rain-33
SvelteKit server-side SDK cookie forwarding: raw header vs event.cookies.getAll()
Use event.request.headers.get('cookie') instead of event.cookies.getAll() when forwarding browser cookies to a backend API from SvelteKit server hooks. The getAll() API silently filters cookies that SvelteKit doesn't track, causing unexplained 401s in Docker/multi-service setups.
@ideal-rain-33