Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/middleware-header-default

Package Overview
Dependencies
Maintainers
5
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/middleware-header-default

[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-header-default/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-header-default) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-header-default.svg)](https:/

  • 3.2.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created

What is @aws-sdk/middleware-header-default?

@aws-sdk/middleware-header-default is a middleware package for the AWS SDK for JavaScript. It allows you to set default headers for your AWS service requests, ensuring that certain headers are always included in your requests without having to manually add them each time.

What are @aws-sdk/middleware-header-default's main functionalities?

Setting Default Headers

This feature allows you to set default headers for all requests made with a specific AWS service client. In this example, a custom header 'x-custom-header' with the value 'my-custom-value' is added to all requests made with the S3 client.

const { HeaderDefaultMiddleware } = require('@aws-sdk/middleware-header-default');
const { S3Client } = require('@aws-sdk/client-s3');

const client = new S3Client({
  region: 'us-west-2',
  middlewareStack: (stack) => {
    stack.add(HeaderDefaultMiddleware({
      'x-custom-header': 'my-custom-value'
    }), {
      step: 'build',
      priority: 'high'
    });
  }
});

// Now all requests made with this client will include the 'x-custom-header' header.

Other packages similar to @aws-sdk/middleware-header-default

FAQs

Package last updated on 09 Jan 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