Azure / Azure/static-web-apps

Support for `apiPrefix` config in Custom Authentication

Open
#1,355 1 comment 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

**Is your feature request related to a problem? Please describe.**

Since the `/.auth` prefix in App Service Authentication can be freely customized with `apiPrefix`, I would like a way to customize the `/.auth` prefix in Static Web Apps as well.

When operating an application in a subdirectory with a combination of Front Door and Static Web Apps, it is necessary to prepare a separate route definition for authentication because the `/.auth` prefix is not customizable. If customization is made possible, this can be handled in a simple manner.

**Describe the solution you'd like**

It would be useful to add an `apiPrefix` property to `staticwebapp.config.json` so that the `/.auth` prefix can be freely customized with that setting.

**Describe alternatives you've considered**

Although it is possible to achieve this by using the App Service, the App Service is a bit over-specified and expensive for hosting SPAs.

**Additional context**

https://learn.microsoft.com/en-us/azure/templates/microsoft.web/sites/config-authsettingsv2?pivots=deployment-language-bicep#httpsettingsroutes

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.