golemcloud/golem/golem-add-cors-go
- community
Checking that the SKILL.md file is still in the repository.
Configuring CORS on a Go agent's HTTP endpoints. Use when the user asks to enable CORS, allow cross-origin requests, or configure allowed origins for HTTP endpoints in a Go Golem project.
Install
npx vskill@latest install golemcloud/golem/golem-add-cors-goSKILL.md
Configuring CORS on Go HTTP Endpoints
Overview
CORS allowed-origin patterns are declared on the agent definition: mount-wide with Mount.CORS, or per route with golem.EndpointCORS. Origins declared at both levels are unioned for that route. CORS is metadata only — declaring it advertises the origins the platform will allow; the gateway handles preflight automatically.
Steps
- Set mount-level origins with
Mount.CORSto cover every endpoint. - Add per-endpoint origins with
golem.EndpointCORS(patterns...); they union with the mount list. - Use `"*"` to allow all origins.
Mount-level CORS
Mount.CORS is a []string of allowed-origin patterns applied to all endpoints:
Endpoint-level CORS
golem.EndpointCORS(patterns...) adds origins for one route. They are unioned with the mount-level list, not replaced:
Wildcard
Use "*" to allow all origins:
CORS preflight
The platform handles OPTIONS preflight requests automatically for endpoints that have CORS configured — you do not declare an OPTIONS route yourself. The preflight response carries Access-Control-Allow-Origin, Access-Control-Allow-Methods, and Access-Control-Allow-Headers.
Key Constraints
Mount.CORSandgolem.EndpointCORS(patterns...)both take origin patterns; the effective set for a route is the union of the two.- An empty
CORSmeans no cross-origin access is allowed for that scope. - CORS declared in code still requires the agent to be served behind an
httpApideployment (seegolem-add-http-endpoint-go).
Related Skills
| Skill | When to Load | |
|---|---|---|
golem-add-http-endpoint-go | Set up the mount and endpoints before adding CORS | |
golem-add-http-auth-go | Require authentication on the endpoints | |
golem-http-params-go | Bind request path/query/header/body to method inputs |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinggolem-skills/skills/go/golem-add-cors-go/SKILL.md
Popularity
- Repository stars
- 1,514
- Repository forks
- 210
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/golemcloud/golem/golem-add-cors-go)