# Apply plugin to specific routes

**URL:** <https://discuss.konghq.com/t/apply-plugin-to-specific-routes/11036>\
**Category:** Questions\
**Created:** [December 27, 2022, 7:31pm UTC](https://discuss.konghq.com/t/apply-plugin-to-specific-routes/11036 "2022-12-27T19:31:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronny.cardona1025](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@ronny.cardona1025](https://discuss.konghq.com/u/ronny.cardona1025)\
**Post date:** [December 27, 2022, 7:31pm UTC](https://discuss.konghq.com/t/apply-plugin-to-specific-routes/11036/1 "2022-12-27T19:31:33Z")

</div>

I want to apply the JWT plugin to all routes except my authentication and authorization routes so that a user on my application can first provide a username and password to retrieve a JWT token before the JWT plugin begins verifying the JWT tokens are valid.

Is it possible to do this without creating a secondary ingress that would include all authorization and authentication endpoints?

For example, I have path **/api** that I would like to perform JWT validation on, except if the paths are **/api/auth/dashboard/authorization** or **/api/auth/dashboard/authentication**.

Your help is appreciated!

---

<div class="post-metadata">

**Author:** ![deos2](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@deos2](https://discuss.konghq.com/u/deos2)\
**Post date:** [January 5, 2023, 11:10am UTC](https://discuss.konghq.com/t/apply-plugin-to-specific-routes/11036/2 "2023-01-05T11:10:57Z")

</div>

You can customize token validate plugin and add check for this. You can also fetch current path by kong.request.get\_path() , parse it and check for auth keyword. If auth keyword is there skip validation else go for validation.
