Closed gtapps closed 7 years ago
Could you add some tests to prove that these changes work? Could you also update the readme with an example of the new functionality?
Hello Freek,
I noticed a small issue since I was using this implementation on a staging environment, so I had to tweak it. I added a test and added an example into the readme. Everything seems to work fine on my project.
Let me know what you think, Gabriel
That tweak adds a lot of complexity. It's also not clear to me what it does. Could you revert this PR to only add the status code to the event.
Propose all other changes in a separate PR.
Sure Freek, I'm going to separate the things then.
Regarding the new feature, It just lets you override the http status code of a URL you have in the "redirects" array if it doesn't have a redirect URL. So I can trigger 410 and whatever status code I wish, based on a URL that is present there. If you check out the readme you can see what I mean.
Gabriel
Closing this for now.
Hello,
I needed to change the HTTP status code on a matched URL(from the "redirects" config array), even if the Redirect URL is empty. Basically, it allows us to set HTTP status code even if the redirect URL is empty. This is useful IMO since allows us to trigger 404, 410, or any other status code defined in the redirect even without a redirect URL.
Cheers, Gabriel