Support for trailingSlash config #418
Labels
complexity: hours
Issues that need less than 1 hour to be resolved
good first issue
Good for newcomers
priority: high (P0)
High priority
scope: msha
Issues happened a the ./src/msha level
scope: rules engine
Specific issues related to src/msha/routes-engine/**
status: need e2e tests
The issue or PR needs 1 or more e2e tests before it get addressed
status: release-blocker
Issues blocking a major release
type: enhancement
New feature or request
type: RFC
This is a request for comment
Is your feature request related to a problem? Please describe.
staticwebappconfig.json will include a property to configure trailingSlash behavior:
The following normalization and redirect rules will apply for each of the available configurations:
Always
When setting trailingSlashes to
always
, all requests that don't include a trailing slash will be redirected to a trailing slash URL. For example,/contact
will be redirected to/contact/
.301
200
301
301
200
301
Never
When setting trailingSlash to
never
, all requests ending in a trailing slash will be redirected to a non-trailing slash URL. For example,/contact/
will be redirected to/contact
.200
301
301
200
301
301
Auto
When setting trailingSlash to
auto
, all requests to folders will be redirected to a URL with a trailing slash. All requests to files will be redirected to a non-trailing slash URL.301
200
301
200
301
301
By default, when the trailingSlash configuration is omitted, Azure Static Web Apps will apply the following rules:
200
200
200
200
301
200
Describe the solution you'd like
Static Web Apps CLI should apply the same redirect and normalization rules.
The text was updated successfully, but these errors were encountered: