An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix(service): add CORS defaults to Directus templates
Xidik9ca65313eab1
diff --git a/templates/compose/directus-with-postgresql.yaml b/templates/compose/directus-with-postgresql.yamlindex c35e411fdd..3aaa8f1390 100644--- a/templates/compose/directus-with-postgresql.yaml+++ b/templates/compose/directus-with-postgresql.yaml@@ -27,6 +27,11 @@ services:- REDIS_HOST=redis- REDIS_PORT=6379- WEBSOCKETS_ENABLED=true+ - CORS_ENABLED=${CORS_ENABLED:-true}+ - CORS_ORIGIN=${CORS_ORIGIN:-true}+ - CORS_METHODS=${CORS_METHODS:-GET,POST,PATCH,DELETE,OPTIONS}+ - CORS_ALLOWED_HEADERS=${CORS_ALLOWED_HEADERS:-Content-Type,Authorization}+ - CORS_CREDENTIALS=${CORS_CREDENTIALS:-true}healthcheck:test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:8055/admin/login"]interval: 5sdiff --git a/templates/compose/directus.yaml b/templates/compose/directus.yamlindex 36589c72a2..5c02ab1a34 100644--- a/templates/compose/directus.yaml+++ b/templates/compose/directus.yaml@@ -22,6 +22,11 @@ services:- DB_CLIENT=sqlite3- DB_FILENAME=/directus/database/data.db- WEBSOCKETS_ENABLED=true+ - CORS_ENABLED=${CORS_ENABLED:-true}+ - CORS_ORIGIN=${CORS_ORIGIN:-true}+ - CORS_METHODS=${CORS_METHODS:-GET,POST,PATCH,DELETE,OPTIONS}+ - CORS_ALLOWED_HEADERS=${CORS_ALLOWED_HEADERS:-Content-Type,Authorization}+ - CORS_CREDENTIALS=${CORS_CREDENTIALS:-true}healthcheck:test:["CMD", "wget", "-q", "--spider", "http://127.0.0.1:8055/admin/login"]