Azure / Azure/static-web-apps

Unable to use role invite link if SWA is behind Azure Front Door and staticwebapp.config.json locks down access to only accept from FrontDoor

Open
#1,251 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Hi,
When a SWA is behind Azure FrontDoor and the staticwebapp.config.json locks down access to only accept traffic from FrontDoor like this:
```json
"networking":{
"allowedIpRanges":[
"AzureFrontDoor.Backend"
]
},
"forwardingGateway":{
"requiredHeaders":{
"X-Azure-FDID":"1111111-873a-4e4c-b556-cacd69e38eee"
},
"allowedForwardedHosts":[
"test.test.com"
]
},
```
It is impossible to use the link to invite users to a role defined within the SWA. The link fails to work as it attempts to navigate the user to the main SWA URL as it has no knowledge of the domain within FrontDoor.

**To Reproduce**
Steps to reproduce the behavior:
1. Create SWA and Azure FrontDoor
2. Create Origin Group and Rule in FrontDoor to send traffic to the SWA
3. Modify staticwebapp.config.json to only allow traffic front FrontDoor (see example above)
4. Attempt to invite an invitation link for adding a user for a role within the SWA
5. See invite url is the SWA url as the SWA has no knowledge of the FD domain
6. Attempt to use invite link, see it fails to work.

**Expected behavior**
Should be able to manually override the domain when create an invitation link.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.