Skip to content

Incomplete example in WebMVC.fn "Redirecting to a resource" #36283

@kzander91

Description

@kzander91

In 6.2, the example snippet shown in the Redirecting to a resource section uses the pathExtension() request predicate to match requests for static resources.

In the same section in 7.0 (following the deprecation of the predicate), use of the pathExtension() predicate was removed, but the extensions list was not.

While the unused file extensions list can cause some confusion and should be removed, I'm more interested in the recommended way to achieve the same functionality as before, matching a request by its file extension. Perhaps the example could be fixed/updated to demonstrate that. In its current form, the code in the snippet would also serve the index.html resource for a request to, for example, /static/image.png, which is what the previous version's snippet avoided.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions