mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 00:14:24 +00:00
feat(domains): add structured URL editing and responsive domain controls
Add reusable domain URL parsing and input components, expose per-domain redirect and indexing controls, and improve application and service domain layouts across responsive breakpoints.
This commit is contained in:
1 parent
61a2b183d3
commit
32bf1860d4
30 files changed
+693
-292
No files matched your search
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use App\Support\DomainUrlParts;
|
||||
|
||||
it('composes a domain URL from segmented fields', function () {
|
||||
expect(DomainUrlParts::compose('https', 'app.example.com', '3000', 'api/v3'))
|
||||
->toBe('https://app.example.com:3000/api/v3');
|
||||
});
|
||||
|
||||
it('splits a domain URL while preserving its path query and fragment', function () {
|
||||
expect(DomainUrlParts::split('http://app.example.com:8080/api?v=1#docs'))->toBe([
|
||||
'scheme' => 'http',
|
||||
'host' => 'app.example.com',
|
||||
'port' => '8080',
|
||||
'path' => '/api?v=1#docs',
|
||||
]);
|
||||
});
|
||||
|
||||
it('defaults empty values for an invalid URL', function () {
|
||||
expect(DomainUrlParts::split(''))->toBe([
|
||||
'scheme' => 'https',
|
||||
'host' => '',
|
||||
'port' => '',
|
||||
'path' => '',
|
||||
]);
|
||||
});
|
||||
|
||||
it('preserves an explicitly configured default port', function () {
|
||||
expect(DomainUrlParts::split('https://app.example.com:443')['port'])->toBe('443');
|
||||
});
|
||||
Reference in new issue
Block a user