Geoff Rich

Results 120 comments of Geoff Rich

Ah, thanks so much for writing that! It fills in some of the blanks from my experimentation this weekend. The most puzzling thing has to do with the `x-ms-client-principal` header...

Oh, another awkward thing: if you add allowedRoles to a route that has non-GET methods, you need to also add `rewrite: "/api/__render"` so it gets passed along to the underlying...

Hm, I wonder if there's a way to write a custom `handle` hook in SvelteKit that rewrites the request to `/api/__render` accordingly ([docs](https://kit.svelte.dev/docs/hooks#server-hooks-handle))

I figured something out - if we point SWA CLI at the SvelteKit dev server for the Azure function API as well, we won't need to build on every change....

> As I mentioned in https://github.com/geoffrich/svelte-adapter-azure-swa/issues/102, I would love for a way to run a production build through swa, including simulation of Azure functions. I needed this to debug a...

@derkoe looks like your repro is private, I get a 404. Though this sounds similar to other issues I ran into trying to access the `x-ms-client-principal` header, though I think...

I think the folks on this thread have already seen it, but I'm tracking SWA CLI config improvements in #96. Looks like we landed on something similar: https://github.com/geoffrich/svelte-adapter-azure-swa/issues/96#issuecomment-1399721167.

One thought I want to write down re: @tlaundal 's comment > However, I think handling all auth in SvelteKit is a no-go, because pre-rendered pages would not hit the...

For those following this issue, I opened a somewhat-related issue on better supporting the `allowedRoles` config in apps built with this adapter: https://github.com/geoffrich/svelte-adapter-azure-swa/issues/134