golem-add-cors-ts

Configure CORS policies for TypeScript HTTP services with origins and preflight handling.

1|Updated Oct 9, 2025
One-click install
npx skills add https://github.com/justcoon/golem-shopping-ts --skill golem-add-cors-ts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-add-cors-ts
Source: https://github.com/justcoon/golem-shopping-ts/tree/main/.agents/skills/golem-add-cors-ts
Command: npx skills add https://github.com/justcoon/golem-shopping-ts --skill golem-add-cors-ts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies configuring Cross-Origin Resource Sharing (CORS) for TypeScript-based HTTP endpoints, enabling secure cross-origin requests without complex setup.

Core Features & Use Cases

  • Mount-Level CORS Configuration: Allow setting CORS policies globally on agent mount points to enable cross-origin requests for all endpoints under a specific route.
  • Endpoint-Level CORS Overrides: Add custom CORS origins for individual endpoints, unioned with mount-level rules to provide fine-grained access control.
  • Wildcard Support: Use '*' to permit all origins, simplifying scenarios requiring open access.
  • Preflight Handling: Automatic management of OPTIONS preflight requests to ensure proper CORS headers without manual intervention.
  • Use Case: Suppose you are deploying an API backend with multiple frontend apps from different domains; this Skill helps you configure precise CORS policies dynamically.

Quick Start

To enable CORS for your TypeScript HTTP endpoints, specify the desired CORS origins in the agent or endpoint decorators, and the system will handle CORS preflight requests automatically.

Frequently Asked Questions about golem-add-cors-ts

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

FAQPage Schema
How do I configure CORS for TypeScript HTTP endpoints?

To configure CORS for TypeScript HTTP endpoints, specify permitted origins in agent or endpoint decorators. The system applies mount-level rules globally and unioned endpoint-level overrides, handling preflight requests automatically.

What's the best way to allow multiple origins for a TypeScript API?

Allowing multiple origins for a TypeScript API is done by setting permitted origins at the agent or endpoint level. The configuration supports unioned origins, combining mount-level and endpoint-level rules for fine-grained access control.

Does TypeScript CORS configuration handle OPTIONS preflight requests automatically?

Yes, TypeScript CORS configuration handles OPTIONS preflight requests automatically. The system manages preflight requests without manual intervention, ensuring proper CORS headers are returned for cross-origin access.

Can I use a wildcard to permit all origins for cross-origin requests?

Yes, you can use a wildcard '*' to permit all origins for cross-origin requests. This simplifies scenarios requiring open access by allowing any domain to interact with your TypeScript HTTP endpoints.

How do I override CORS policies for a specific endpoint in TypeScript?

To override CORS policies for a specific endpoint, add custom CORS origins to individual endpoint decorators. These custom origins are unioned with mount-level rules to provide fine-grained access control.

When do I need CORS configuration for TypeScript HTTP services?

You need CORS configuration for TypeScript HTTP services when deploying an API backend accessed by frontend apps from different domains. It enables secure cross-origin requests without complex manual setup.