Azure / Azure/static-web-apps

trailingSlash "never" configuration does not work properly

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

**Describe the bug**

I have a Blazor WebAssembly project where the `staticwebapp.config.json` is in the `wwwroot` directory. The `swa-cli.config.json` is in the root directory of the project.

When deploying the static web app to Azure the `navigationFallback` configuration applies but not the `trailingSlash` configuration.

In #1017 it is mentioned the `staticwebapp.config.json` needs to be in the root directory of the project (which is the configured `appLocation` in `swa-cli.config.json`) but in the documentation it clearly states:

"However, the file may be placed in any subfolder within the folder set as the `app_location`."

**To Reproduce**

Project: https://github.com/DavidVollmers/Ignis/tree/master/website/Ignis.Website
Deployed Website: https://ignis.dvolper.dev

Link that works: https://ignis.dvolper.dev/docs/components/headlessUI
Link that does not work: https://ignis.dvolper.dev/docs/components/headlessUI/

**Expected behavior**

Whenever a trailing `/` is added to any URL it should be removed.

**Additional context**

For some reason it works for `https://ignis.dvolper.dev/`, which redirects to `https://ignis.dvolper.dev`.

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.