Skip to content

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.

Fix: Disable API by default

peaklabs-dev111e9ba3a33b
diff --git a/database/migrations/2024_09_26_083441_disable_api_by_default.php b/database/migrations/2024_09_26_083441_disable_api_by_default.php
new file mode 100644
index 0000000000..d0803f751d
--- /dev/null
+++ b/database/migrations/2024_09_26_083441_disable_api_by_default.php
@@ -0,0 +1,18 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ */
+ public function up(): void
+ {
+ Schema::table('instance_settings', function (Blueprint $table) {
+ $table->boolean('is_api_enabled')->default(false)->change();
+ });
+ }
+};
diff --git a/resources/views/livewire/security/api-tokens.blade.php b/resources/views/livewire/security/api-tokens.blade.php
index a73a9ca1a1..3da3a2dbed 100644
--- a/resources/views/livewire/security/api-tokens.blade.php
+++ b/resources/views/livewire/security/api-tokens.blade.php
@@ -6,7 +6,7 @@
<div class="pb-4 ">
<h2>API Tokens</h2>
@if (!$instanceSettings->is_api_enabled)
- <strong>API is disabled. If you want to use API, please enable it in the Instance Settings.</strong>
+ <strong>API is disabled. If you want to use the API, please enable it in the Coolify Instance Settings.</strong>
@else
<div>Tokens are created with the current team as scope. You will only have access to this team's resources.
</div>