Azure / Azure/static-web-apps

responseOverrides 403 for requests denied by allowedIpRanges

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

Description

**Is your feature request related to a problem? Please describe.**
SWA will return 403 if client Ip does not match `networking > allowedIpRanges`.
https://learn.microsoft.com/en-us/azure/static-web-apps/configuration#networking

In this case, 403 page is provided by Azure default.

![Image](https://github.com/user-attachments/assets/6f3f379a-a1ce-4427-a04b-0b4fa5af4c7a)

custome response configured with `responseOverrides > 403` seems not be applyed with this scenario.
https://learn.microsoft.com/en-us/azure/static-web-apps/configuration#response-overrides

**Describe the solution you'd like**

Apply `responseOverrides > 403` configuration to such ip restriction responses.

**Describe alternatives you've considered**

It is not well documented.
If it is not supported scenario, please update document.

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.