Naz
eb6d1b208a
Made options parameter optional
...
refs https://github.com/TryGhost/Toolbox/issues/139
- The options parameter doesn't have to be passed in as there is handling for a default value in place - "permanent = false"
2021-11-29 16:08:03 +04:00
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 '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