Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
325 stars 56 forks source link

Updating from Free hosting plan to standard throws 403 forbidden #1423

Open share2praveen opened 7 months ago

share2praveen commented 7 months ago

Recently deployed a static webapp in Azure SWA hosted under free plan and the web app was working fine without any issue. After changing the sku to Standard plan the site throws 403 forbidden.

We changed the hosting plan in Azure portal. Any help is much appreciated. No special config is added staticwebapp.json not even routes is part of staticwebapp.json

{
  "trailingSlash": "auto",
  "routes": [
    {
    "route": "/notfound",
    "statusCode": 404
    }
  ],
  "navigationFallback": {
    "rewrite": "index.html",
    "exclude": ["/images/*.{png,jpg,gif}", "/css/*"]
  },
  "responseOverrides": {
    "404": {
      "rewrite": "/404.html"
    }
  },
  "globalHeaders": {
    "content-security-policy": "default-src https: 'unsafe-eval' 'unsafe-inline'; object-src 'none'"
  },
  "mimeTypes": {
    ".json": "text/json"
  }
}
thomasgauvin commented 7 months ago

Do you have additional details about the error message you are encountering?

share2praveen commented 7 months ago

@thomasgauvin nope! I'm getting 403 forbidden error page

thomasgauvin commented 6 months ago

It seems you may have the wrong file name for the static site configuration, staticwebapp.config.json as per docs