feat: add most permissive CORS configuration

- Set origin to '*' to allow all origins
- Set allowedHeaders to '*' to allow all headers
- Add explicit methods configuration for all common HTTP methods
- Enables full cross-origin access for development and integration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-23 09:11:01 +08:00
parent 26d1d391b7
commit 0854fb719d

View File

@@ -16,8 +16,10 @@ const server = fastify({
async function start() { async function start() {
try { try {
await server.register(cors, { await server.register(cors, {
origin: true, origin: '*',
credentials: true, credentials: true,
methods: ['GET', 'PUT', 'POST', 'DELETE', 'OPTIONS'],
allowedHeaders: ['*'],
}); });
await server.register(scriptActions); await server.register(scriptActions);