Azure / Azure/static-web-apps

routePrefix option in host.json

Open
#170 5 comments 2 reactions 0 assignees View on GitHub
Functions routing
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

I added `routePrefix` option to host.json to use custom route and domain.
For example, if custom domain is `webapp.com`, I want to call API with `/azure/api` route.

It worked in the local environment, but on GitHub action process, got below error.
```
---End of Oryx build logs---
Function Runtime Information. OS: Linux, Functions Runtime: v3, Node version: 12.X
Finished building function app with Oryx
Found and validated 'routes.json' within build artifacts folder.
Error in processing api build artifacts: the host.json file cannot specify a http.routePrefix value other than 'api'.
```

My host.json settings:
```
{
"version": "2.0",
"watchDirectories": [ "lib" ],
"extensions": {
"http": {
"routePrefix": "azure/api",
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[1.*, 2.0.0)"
}
}

```

Is the routePrefix option is not supported in the azure static web app?

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.