New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

snowpack-custom-headers

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snowpack-custom-headers

Allow snowpack to serve a custom set of headers during development

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

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

// 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.

FAQs

Package last updated on 05 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc