Azure / Azure/static-web-apps

V2 PROGRAMMING MODEL FOR AZURE FUNCTIONS NOT COMPATIBLE WITH STATIC WEB APP

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

Hi All.

I am using staticwebapp service to deploy a react+fastapi application
While setting up my backend , by adding the function_app.py to get access to my fastapi endpoints via `azure.functions.AsgiFunctionApp`, and other configuration files.... I get this error while running:

```
A host error has occurred during startup operation '14ec3daa-650f-492d-80fb-849950a8a155'.
[2025-05-27T12:45:35.710Z] Microsoft.AspNetCore.Routing: An error occurred while creating the route with name 'api' and template 'api//{*route}'. Microsoft.AspNetCore.Routing: The route template separator character '/' cannot appear consecutively. It must be separated by either a parameter or a literal value. (Parameter 'routeTemplate'). Microsoft.AspNetCore.Routing: The route template separator character '/' cannot appear consecutively. It must be separated by either a parameter or a literal value.
```
I already tried to set my `http.routePrefix` to empty string, but the webstaticapp build fail, it must be set to 'api' according to logs.

Please help fixing this issue

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.