security-headers

Implement HTTP security headers with TypeScript middleware for web applications.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/engineers-hub-ltd-in-house-project/eh-skills --skill security-headers-engineers-hub-ltd-in-house-project
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-headers
Source: https://github.com/engineers-hub-ltd-in-house-project/eh-skills/tree/main/skills/authentication/security-headers
Command: npx skills add https://github.com/engineers-hub-ltd-in-house-project/eh-skills --skill security-headers-engineers-hub-ltd-in-house-project

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you implement essential HTTP security headers to protect your web application from common attacks like clickjacking, cross-site scripting (XSS), and man-in-the-middle attacks.

Core Features & Use Cases

  • HTTP Security Headers: Configure HSTS, CSP, X-Frame-Options, CORS, and secure cookie attributes.
  • Attack Prevention: Mitigates risks associated with insecure transport and browser-level vulnerabilities.
  • Use Case: When deploying a new web service, use this Skill to ensure all critical security headers are correctly configured to meet industry best practices.

Quick Start

Apply the security headers middleware to your web application's request pipeline.

Frequently Asked Questions about security-headers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure HTTP security headers to prevent clickjacking and XSS?

HTTP security headers prevent clickjacking and XSS by applying TypeScript middleware that sets CSP and X-Frame-Options policies in your request pipeline. This enforces browser-level restrictions to block malicious frame injections and cross-site scripting execution.

What HTTP headers do I need to secure transport layer and prevent man-in-the-middle attacks?

To secure the transport layer and prevent man-in-the-middle attacks, you need to implement HSTS headers. This Skill configures HSTS policies to force HTTPS connections, ensuring browsers strictly only connect over secure transport layers.

Can I dynamically configure CORS policies based on different application environments?

Yes, you can dynamically configure CORS policies based on environment and application needs. The Skill utilizes TypeScript middleware patterns to adjust cross-origin resource sharing rules, ensuring secure resource access across varying deployment contexts.

How do I set secure cookie attributes using HTTP security headers?

You set secure cookie attributes by configuring them alongside other HTTP security headers within the middleware. This ensures cookies are transmitted only over secure protocols with appropriate attributes, mitigating risks associated with insecure browser-level data storage.

What is the best way to implement HSTS and CSP for a new web service deployment?

The best way to implement HSTS and CSP for a new web service is to integrate TypeScript middleware patterns into your request pipeline. This dynamically applies the strict transport security and content security policies required for industry best practices.