Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

Give Docker installs the right fix when JWT_SECRET is the published example (#1442)

Dave Earleyc31c2c403a55
diff --git a/backend/app/Http/Middleware/RejectPublishedSecrets.php b/backend/app/Http/Middleware/RejectPublishedSecrets.php
index d5681098a..7f94ddb34 100644
--- a/backend/app/Http/Middleware/RejectPublishedSecrets.php
+++ b/backend/app/Http/Middleware/RejectPublishedSecrets.php
@@ -16,7 +16,7 @@ class RejectPublishedSecrets
public function handle(Request $request, Closure $next): mixed
{
if (config('jwt.secret') === self::PUBLISHED_JWT_SECRET) {
- Log::critical('Refusing requests: JWT_SECRET still holds the public example value from .env.example. Generate a new one with `php artisan jwt:secret --force`.');
+ Log::critical('Refusing requests: JWT_SECRET still holds the public example value from .env.example. On a manual install, run `php artisan jwt:secret --force` and restart. On Docker, set a new JWT_SECRET (for example from `openssl rand -base64 32`) in the environment or .env file your compose file reads, then run `docker compose up -d`.');
return response()->noContent(ResponseCodes::HTTP_SERVICE_UNAVAILABLE);
}