'Is it faster to proxypass to remove an ending / or is it quicker using php?

long story short, I'm cleaning an API possessing routes like /brand/ and /users and I was thinking of removing finishing slash, to not break the legacy code I found 2 solutions:

-redirecting using nginx proxypass

-removing the finishing slash before the route handler

The issue is that I know how to test php speed but I have absolutely no idea how to test nginx :/



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source