Skip to content
Snippets Groups Projects
Commit 973015bc authored by Oliver Hader's avatar Oliver Hader Committed by Georg Ringer
Browse files

[FEATURE] Allow to directly declare static route variables

Instead of having to use custom route aspect mappers, implementing
`StaticMappableAspectInterface`, to avoid having `&cHash=` signatures
being applied to the generated URL, variables now can be simply
declared `static` in the corresponding route enhancer configuration.

By using the new `static` route configuration directive, custom aspect
mapper implementations can be avoided. However, static route variables
are only applied for a particular variable name if no other aspect
mapper is defined (those would take precedence) and if a companion
`requirements` definition is given (should be restrictive, to reduce
possible cache flooding scenarios).

Example:

routeEnhancers:
  Verification:
    type: Simple
    routePath: '/verify/{code}'
    static:
      code: true
    requirements:
      code: '[a-f0-9]{40}'

Resolves: #93100
Releases: main
Change-Id: I4a929c88622ec49fca92fc7699ea96bfa7565309
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74016


Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
parent 0af55915
Branches
Tags
No related merge requests found
Showing with 347 additions and 9 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment