When a docker compose service has multiple comma-separated domains, the
generate() method was only processing the first domain and truncating the rest.
The issue was that Url::fromString() can't parse comma-separated URLs - it only
parses the first one.
Fixed by:
1. Splitting comma-separated domains with explode(',', $domain_string)
2. Processing each domain individually in a foreach loop
3. Generating preview URLs for each domain using the same template/random/pr_id
4. Joining the results back with implode(',', $preview_fqdns)
This ensures all domains get properly transformed for preview deployments.
Example:
- Original: http://domain1.com,http://domain2.com
- Preview: http://57.domain1.com,http://57.domain2.com
- Before fix: http://57.domain1.com,http (truncated)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
7 lines
No EOL
400 B
PHP
7 lines
No EOL
400 B
PHP
<form wire:submit="save" class="flex items-end gap-2">
|
|
<x-forms.input helper="One domain per preview." label="Domains for {{ str($serviceName)->headline() }}" id="domain"
|
|
canGate="update" :canResource="$preview->application"></x-forms.input>
|
|
<x-forms.button type="submit">Save</x-forms.button>
|
|
<x-forms.button wire:click="generate">Generate
|
|
Domain</x-forms.button>
|
|
</form> |