# snowpack-custom-headers

> Allow snowpack to serve a custom set of headers during development

Latest version **0.0.1** (published 2021-10-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install snowpack-custom-headers
pnpm add snowpack-custom-headers
yarn add snowpack-custom-headers
bun add snowpack-custom-headers
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2021-10-05 |
| First published | 2021-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Samuel Seay |
| Maintainers | samseay |

## Links

- npm: https://www.npmjs.com/package/snowpack-custom-headers
- npm.io page: https://npm.io/package/snowpack-custom-headers

## Dependencies (2)

- [execa](https://npm.io/package/execa.md) ^5.1.1
- [http-proxy](https://npm.io/package/http-proxy.md) ^1.18.1

## Recent versions

- 0.0.1 (latest) — 2021-10-05

## README

# snowpack-custom-headers

Allow snowpack to serve a custom set of headers during development

### Usage

First install the package `npm i https://github.com/samueljseay/snowpack-custom-headers -D` or with yarn `yarn add https://github.com/samueljseay/snowpack-custom-headers --dev`

```javascript
// in snowpack.config.mjs
export default {
  devOptions: {
    // You'll need to disable the auto-open functionality, the plugin will open the right page
    open: "none",
  },

  plugins: [
    [
      "snowpack-custom-headers",
      {
        headers: {
          // This is just an example, add any headers you need here.
          "Cross-Origin-Opener-Policy": "same-origin",
          "Cross-Origin-Embedder-Policy": "require-corp",
        },
      },
    ],
  ],
};
```

### Caveats

Note that right now it will serve the same headers for all requests. If you need specific headers per-resource then
please submit a PR.

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