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 | Interceptor | Constructor<Provider<Interceptor>> | An interceptor function or provider class |
| nameOrOptions | string | InterceptorBindingOptions | Binding name or options |
Returns: