Skip to content

Commit d454147

Browse files
authored
docs: add gotchas section to README (#183)
Documents the behavior encountered in #178 and the workaround in #179
1 parent a86dff7 commit d454147

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -279,3 +279,12 @@ steps:
279279
output_location: "build/static" # Built app content directory - optional
280280
###### End of Repository/Build Configurations ######
281281
```
282+
283+
## Gotchas
284+
285+
Azure has its share of surprising or quirky behaviors. Here is an evolving list of things to look out for:
286+
287+
> [!CAUTION]
288+
> Azure silently strips the `content-type` header from requests that have no body.
289+
>
290+
> [SvelteKit form actions](https://kit.svelte.dev/docs/form-actions) are valid with no parameters, which can lead to `POST` requests that have an empty body. Unfortunately, [Azure deletes the `content-type` header when the request has an empty body](https://github.com/geoffrich/svelte-adapter-azure-swa/issues/178), which breaks SvelteKit's logic for handling form actions. Until [this is addressed by Azure](https://github.com/Azure/static-web-apps/issues/1512), update to [verson 0.20.1](https://github.com/geoffrich/svelte-adapter-azure-swa/releases/tag/v0.20.1) which contains a workaround for this behavior.

0 commit comments

Comments
 (0)