Azure / Azure/static-web-apps

static-web-apps-deploy@v1 requires API routePrefix - AsgiFunction App

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

if routePrefix is empty in the host.json, then the GitHub action [static-web-apps-deploy@v1](https://github.com/Azure/static-web-apps-deploy/tree/v1) will throw:

Error in processing api build artifacts: the host.json file cannot specify a http.routePrefix value other than 'api'.

**Surely this can just be made into a warning...**

I would like to use AsgiFunction app (with FastAPI) but FastAPI prepends its routes with a **/** and AsgiFunction postpends its api route with **/** so host.json routePrefix needs to be left empty **""** for most ASGI apps otherwise you'll get consecutive **//** routing error.

If this can be made into a warning one can add the API prefix in their Asgi app instead (in fastAPI router).

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.