Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit transformation to a url regex #2

Open
leroy0211 opened this issue Jun 29, 2019 · 1 comment
Open

Limit transformation to a url regex #2

leroy0211 opened this issue Jun 29, 2019 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@leroy0211
Copy link

Would it be possible to limit the execution of the transformation to a route regular expression like ^/api/? So the transformation of the exceptions wouldn't occur on other places of the application which sometimes might throw an HttpException when accepting application/json but shouldn't be transformed.

This might be usefull for some applications which are not yet fully based on api's, or for some who want to migrate to newly structured api's

@veewee
Copy link
Contributor

veewee commented Jul 1, 2019

Hello @leroy0211,

Sound like a solid idea!
Maybe best to inject a RequestMatcherInterface into the listener so that you can do whatever matching you want.
I would surely accept a PR for that.

@veewee veewee added enhancement New feature or request help wanted Extra attention is needed labels Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants