mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-06 16:24:12 +00:00
fix(applications): store custom nginx config from API correctly
Decode base64 custom_nginx_configuration before model assignment so it is not double-encoded, and allow null values when clearing the setting. Add API coverage for create, update, invalid input, and clearing behavior.
This commit is contained in:
@@ -886,8 +886,8 @@ class Application extends BaseModel
|
||||
public function customNginxConfiguration(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
set: fn ($value) => base64_encode($value),
|
||||
get: fn ($value) => base64_decode($value),
|
||||
set: fn ($value) => is_null($value) ? null : base64_encode($value),
|
||||
get: fn ($value) => is_null($value) ? null : base64_decode($value),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user