hapi — Disable Plugins for a Selected Route

The powerful plugin system is one of hapi’s most undervalued features! It’s a great component, well implemented and allows you to develop your features isolated from one another to separate concerns.

Imagine this example: you’ve enabled CSRF protection using hapi’s crumb plugin and also want to consume webhooks that notify your systems about specific events. Well, the 3rd party systems can’t know about the CSRF token and no request will pass the validation without the token. That’s where you turn a blind eye for the webhook and trust their requests.

This tutorial shows you how to disable a plugin on a selected route.


Continue reading

University Enrollment Required

Future Students benefit from value packed videos and tutorials.

Enroll to receive exclusive content or sign in if you’re already a Future Student.

Enroll me for $15/mo

Explore the Library

Find interesting tutorials and solutions for your problems.