Page Contents
Home > @loopback/core > Application > interceptor
Application.interceptor() method
Register an interceptor
Signature:
interceptor(interceptor: Interceptor | Constructor<Provider<Interceptor>>, nameOrOptions?: string | InterceptorBindingOptions): Binding<Interceptor>;
Parameters
| Parameter | Type | Description |
|---|---|---|
|
interceptor |
An interceptor function or provider class | |
|
nameOrOptions |
string | InterceptorBindingOptions |
(Optional) Binding name or options |
Returns: