How to remove RequestHandler?

0
There is a method for adding a RequestHandler: Core.addRequestHandler. Is there any method for removing a RequestHandler?
asked
1 answers
0

There is no method to remove a RequestHandler in Mendix once it has been added. A RequestHandler registered via Core.addRequestHandler stays active for the entire lifetime of the runtime. This is expected behavior.


RequestHandlers are designed to be static and long-lived, and they should be registered once at startup (for example in afterStartup). They cannot be unregistered, replaced, or toggled at runtime.


If you need enable/disable behavior, the recommended approach is to keep the handler registered and control its behavior inside the handler itself (for example with a configuration flag or environment check).

answered