# no-authorization-interceptor

> Removes Authorization header if X-No-Authorization will be found.

Latest version **1.0.0** (published 2019-12-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install no-authorization-interceptor
pnpm add no-authorization-interceptor
yarn add no-authorization-interceptor
bun add no-authorization-interceptor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-12-16 |
| First published | 2019-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | iamthes |

## Links

- npm: https://www.npmjs.com/package/no-authorization-interceptor
- npm.io page: https://npm.io/package/no-authorization-interceptor

## Recent versions

- 1.0.0 (latest) — 2019-12-16

## README

# no-authorization-interceptor

Removes Authorization header if X-No-Authorization will be found.

```ts (src/components/no-authorization-interceptor/index.ts)
import { HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
import { Injectable } from '@angular/core';

/**
 * Removes Authorization header if X-No-Authorization will be found.
 */
@Injectable({ providedIn: 'root' })
export class NoAuthorizationInterceptor implements HttpInterceptor {
    intercept(request: HttpRequest<unknown>, next: HttpHandler) {
        if (request.headers.has('X-No-Authorization')) {
            request = request.clone({ headers: request.headers.delete('Authorization') });
        }
        return next.handle(request);
    }
}

```

---
_Source: https://npm.io/package/no-authorization-interceptor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
