Review main Merged

74016[FEATURE] Allow to directly declare static route variables

Oliver Hader CR +2 V +2 Hard +347 −9 updated 08/06/24, 20:17

Commit message

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}'

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 9