Skip to content

Conversation

@mytuny
Copy link

@mytuny mytuny commented Jun 11, 2019

Problem:

Defined route:

WP_Route::get('flights', 'callbackFn');

Any of the following request URIs will match with the above route definition and 'callbackFn' get fired:
"/flight", "/anytext", "/tttttttt", "eeee" ...etc

Fix:

An additional utility method called "matchRouteToRequest" has been added. Then, we add a filter inside the 'handler' to filter-out the routes with a pattern that do not match the requested URI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant