Questions tagged [azure-static-web-app-routing]

15 questions
5
votes
2 answers

Redirect Azure Static Web App from naked domain to www

I have set up an Azure Static Web App with a custom domain. Both example.com and www.example.com are correctly set up and working. I would now like to create some rule in staticwebapp.config.json so all requests coming in to https://example.com/*…
1
vote
1 answer

Can a single Azure Static WebApp host multiple Angular applications?

I use the same Azure Static WebApp to host multiple docs. Each doc is an Angular application maintained by a team. I have a pipeline that deploys every doc dist in the docs directory of the Azure Static WebApp…
1
vote
2 answers

How do I locate my staticwebapp.config.json in Azure Devops release Deploy Azure Static Web App?

I have a pipeline that builds the artificat for my Angular app. Deployment works fine until I try to go to specific URLs. It redirects me to 404. This has to do with the staticwebapp.config.json. It looks like: { "navigationFallback": { …
1
vote
1 answer

I have one subdirectory angular build inside my main angular build and its not working in static web apps azure

I have two apps. One is app1 which is main app and another is app2. Both are angular apps. I build my app1 for root and placed my app2 build inside app1 build in app2 folder. I build app2 for subdirectory with --base-href=/app2/. Now build look like…
0
votes
1 answer

Issue with final redirect URI after successful AAD Auth in a React.js Azure Static Web App

I am very new to React.js. Just created a simple app where user needs to authenticate with the Azure Active Directory (AAD) to access a given page ("authenticated-map"). I'm using Custom AAD Auth for Azure Static Web Apps (specifically Azure Active…
0
votes
0 answers

how to install static-web-app-cli offline in redhat and ubuntu?

As the Azuredevops server is not supported for for the task "task: AzureStaticWebApp@0", we were trying to use the swa cli in our azuredevops agents(ubuntu and redhat). But offline installation of the swa cli is failing with this error. npm install…
0
votes
1 answer

How to manually deploy a NextJS SPA in Azure Static Web Apps

I have this NextJS SPA that I want to deploy in Azure Static Web Apps. It's a fairly simple app with some dynamic routes (e.g. /pages/requests/[id]/*). Data in my components/routes is fetched through client-side only (no SSR or SSG). At first, I…
0
votes
0 answers

NextJS website hosted on Azure as a Static Web App gets 405 error when accessing /API/* routes

When running my nextjs app locally I can call /api/foo.js from the nextjs app itself successfully. However once hosted on Azure as a Static Web App it returns a 405 Method Not Allowed error. I wonder if this is to do with /api expecting to be used…
0
votes
0 answers

Can I expose a public endpoint from an Azure Static Web App API?

I am building a static web application (using Blazor) which includes a Azure Function (C#) API. This is specified when creating the the static app on the portal and is built with GitHub Actions. In the client code I access the api with…
GilShalit
  • 6,175
  • 9
  • 47
  • 68
0
votes
0 answers

Azure Static Web App CLI crashing after port 7071 already in use

Following the Azure SWA CLI tutorials, I find that I am able to get the API to run at port 4280 once and then it crashes the CLI. Likely related - I am warned that port 7071 is already in use when launching. Full details are here. Thanks.
0
votes
1 answer

Azure Web Apps + Active Directory B2C. Logout operation keeps me still as logged in

I've implemented a really simple Razor Webassembly application and used Azure Active Directory B2C as source of truth for authenticate and authorize user. When I type the StaticWebApp url in my browser, I'm redirected to the login page as expected…
0
votes
1 answer

Nextjs application on Azure static web app routing issue

I have build an Nextjs application which display data from database through an API. The data should be displayed as folder structures. If a row in database is marked as folder then it should be displayed as folder otherwise it should be displayed as…
0
votes
1 answer

Azure Static Web Apps multi language websites that use microformat (eg en-GB , it-IT )

It is possible to cleanly support URLs such as https://www.myawsomeapp.com/en-GB/ https://www.myawsomeapp.com/it-IT/ routes are angular routes and we need the fallback to fallback to the countries content. the file system has a folder for each…
Steve Drake
  • 1,968
  • 2
  • 19
  • 41
-1
votes
1 answer

Custom SSL certificate on azure static web app

I have a static web app building from Git Hub and being deployed to Azure. I need to use a custom SSL certificate, not the one issued by Azure, but I do not see any options on the dashboard to upload a certificate. Is there something I am missing or…
-1
votes
1 answer

Azure Static Webb App restiction access for unauthenticated users

I am trying to restrict access to certain pages of my app to authenticated users only. Hovewer, if anonymous user clicks page for first time it loads and after refresh user is getting 401 error. Here is my react router