Questions tagged [azure-static-web-app]
340 questions
5
votes
2 answers
staticwebapp.config.json not working with github Azure static web site?
I created a simple site with the following file structure:
/index.html
/down.html
/.github/workflows/azure-static-web-apps-xxxx.yml
/staticwebapp.config.json
This deploys, and I can see my index and down pages, and if I modify either, it magically…

John Little
- 10,707
- 19
- 86
- 158
5
votes
2 answers
Change the source "Branch" in Azure Static Web App
When setting up an Azure Static WebApp when I chose GitHub as the source provider, the UI provides an option to choose from one of the existing branches. But once the app is created I don't see any option to change the source.
Whereas in Azure "App…

Gangula
- 5,193
- 4
- 30
- 59
5
votes
1 answer
How can I change the workflow's yml file in an Azure Static Web App?
I have created a Static Web App with GitHub in Azure. The app and the API work well, the URL is something like https://[random-name].azurestaticapps.net, and the source is the main branch in GitHub. My problem is that I want to change the name of…

ZeroLiam
- 196
- 1
- 8
5
votes
2 answers
Can I redirect with wildcard in Azure Static Web App?
I'm trying to redirect API calls from my Static Web App to another Function App but I can't get wildcard to work.
The route matches correctly but I want the * part to be included in the redirect.
This is an example from my staticwebapp.config.json
…

Pulka
- 51
- 1
5
votes
2 answers
Azure Static Web Apps: How to set the version of Node.js?
I want to use Node.js v12.x to build and deploy but it uses 14.15.1:
Using Node version:
v14.15.1
Using Npm version:
6.14.8
user13087034
5
votes
2 answers
Azure static web app environment variable
I am trying to publish Gatsbyjs by Azure Static web app.
I have a plugin (gatsby-source-contentful).
I need to pass variables like:
{
resolve: `gatsby-source-contentful`,
options: {
spaceId: process.env.CONTENTFUL_SPACE_ID,
…

i3bdulr7man
- 57
- 1
- 5
4
votes
1 answer
How do you deploy a next.js app using SWA-CLI (for Azure Static Apps)
SWA-CLI
https://azure.github.io/static-web-apps-cli/
I created a basic next js app on my machine using
npx create-next-app@latest
After installing the SWA-cli, I run
swa init
I enter my configuration name when prompted. It shows me the following…

JS noob
- 429
- 5
- 14
4
votes
1 answer
How can I access Azure Static Web Apps Application Settings in Angular?
I deployed an Angular App as Static Web App into Azure. Now I want to use the Application Settings in the Configuration to change variables in my environment.ts to access different APIs and Application Insights without changing the code every…

Laura Seidel
- 51
- 1
- 5
4
votes
1 answer
404 Error when authenticating a Azure Static Web Application
I have created a static web application in Azure. This is just a plain site with only HTML pages. I am able to deploy and access the application.
The issue is when I try to integrate Azure Active Directory with this service. My…

Abhishek Karanthoor
- 43
- 3
4
votes
3 answers
Azure Static Web App with Vue project routing not working
I have a vue project deployed with Azure Static Web App. project contain router (history mode) functionality. It works perfect on local. But after deploying to Azure path links not working correctly. For example when I try to access mysite.com/about…

Nick Wynther
- 58
- 1
- 6
4
votes
2 answers
Why select location in Azure Static Web Apps?
According to the Azure Static Web Apps Documentation, one of the key features of the Azure Static Web Apps service is:
Globally distributed static content, putting content closer to your users.
If it is globally distributed, what is the purpose of…

Andrew Lam
- 3,675
- 4
- 23
- 34
4
votes
1 answer
Authorisation using MSAL for a function in Azure Static Web App
I'm trying to authenticate and authorise a user for an Azure function that's created and exposed using an Azure Static Web App, using Azure AD and MSAL. The user can succesfully access the API if I configure the app to use the older AAD v1 flow but…

PaulB
- 105
- 1
- 8
3
votes
0 answers
Having trouble passing env variable values to Azure SWA-deployed frontend-only web app
My situation is the following:
Vite-based development environment. React.js frontend-only web site; deployed to Azure SWA successfully. I have included an instance of Google Maps JavaScript API as well as a user form which uses EmailJS to send an…

jcomp_03
- 127
- 1
- 8
3
votes
1 answer
Azure Machine Learning REST Endpoint - Failed to Fetch
I created an Azure Machine Learning model with a REST Endpoint as a way to consume it. When I run the service using Postman everything seems to work fine.
However, when I try to create an HTML website (Codepen) with a javascript to call the REST…

Ziggy
- 491
- 1
- 6
- 17
3
votes
0 answers
Set Azure Static Web App Custom Domain as Default
I have Azure Static Web Apps with one or more custom domains. I create the static web app and the custom domains via azure powershell.
In the Azure Portal I can set the default domain like this.
My problem is, I don't know how I can achieve this via…

abc
- 2,285
- 5
- 29
- 64