Cookies with sameSite or domain properties are not sent to client (non-local env)
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
When sending cookies as a response to a request in an included functions API (as part of a static web app), the cookies are not sent if they include the `sameSite` or `domain` properties. This only occurs in a deployed static web app - this issue is not present in local testing of the API functions.
**To Reproduce**
Steps to reproduce the behavior:
1. Create static web app with an API. Host it on Github and use a GH workflow to deploy to Azure static web apps.
2. Set a cookie on the response with the `sameSite: true` or `domain: "domain.com"`.
3. Deploy static web app.
4. Visit static web app API page (eg. /api/test) and inspect cookies in browser.
5. Observe that the cookie was not set.
GitHub Actions workflow YAML file and staticwebapp.config.json files: [files.zip](https://github.com/Azure/static-web-apps/files/8267813/files.zip)
**Expected behavior**
The cookie should be set, just like how it works when testing API functions locally with `func start`.
**Device info:**
- OS: Windows 10
- Browser: Firefox
- Version: 98.0.1
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.