Naz
c44e33b1f7
Simplified DynamicRedirectManager's constructor interface
...
refs https://linear.app/tryghost/issue/CORE-84/have-a-look-at-the-eggs-redirects-refactor-branch
- There is no need to pass in whole "urlUtils" instance to construct the class as all the class has to know is how to construct a "subdirectory URL" which can be a single function passed in instead of a vague object instance
2021-10-12 17:21:46 +02:00
Naz
ba2a5df493
Added handling for invalid redirect regexes
...
refs https://linear.app/tryghost/issue/CORE-84/have-a-look-at-the-eggs-redirects-refactor-branch
refs 8f5186995d
refs 260a47da83
- The router should not stop working when an invalid redirect definition is added
- Referenced commits solve this exact problem before this module was introduced
2021-10-12 17:21:46 +02:00
Naz
80f2a001ec
Simplified DynamicRedirectManager's constructor interface
...
refs https://linear.app/tryghost/issue/CORE-84/have-a-look-at-the-eggs-redirects-refactor-branch
- In most of the packages we follow the pattern of passing in a single "options" object into a constructor and desructuring those the object into parameter, like this example: 077c83dc2d/packages/limit-service/lib/limit-service.js (L19-L26)
2021-10-12 17:21:46 +02:00
Fabien O'Carroll
a438795d4a
Published new versions
...
- @tryghost/express-dynamic-redirects@0.1.0
2021-09-29 12:02:26 +02:00
Fabien 'egg' O'Carroll
8c92f5744c
Added express-dynamic-redirects module ( #337 )
...
refs https://github.com/TryGhost/Team/issues/1091
The Offers feature needs to be able to add and remove redirects to Ghost
- which is very similar to the custom redirects functionality. Here we've
pulled out the core of the dynamic redirect part of custom redirects so
that it can be used by both features and have code shared between them.
2021-09-29 12:01:40 +02:00