mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 08:17:02 +00:00
feat(domains): add per-domain noindex support
Flagged domains are served with X-Robots-Tag: noindex, nofollow via Traefik and Caddy routing labels, so an auto-generated technical domain can be excluded from indexing while the production domain on the same resource stays indexable.
This commit is contained in:
1 parent
3da9942bf3
commit
4afe131905
20 files changed
+617
-23
No files matched your search
@@ -94,6 +94,7 @@ class Service extends BaseModel
|
||||
{
|
||||
$domains = $this->applications()->get()->pluck('fqdn')->sort()->toArray();
|
||||
$domains = implode(',', $domains);
|
||||
$noindexDomains = $this->applications()->get()->pluck('noindex_domains')->flatten()->filter()->sort()->implode(',');
|
||||
|
||||
$applicationImages = $this->applications()->get()->pluck('image')->sort();
|
||||
$databaseImages = $this->databases()->get()->pluck('image')->sort();
|
||||
@@ -104,7 +105,7 @@ class Service extends BaseModel
|
||||
$databaseStorages = $this->databases()->get()->pluck('persistentStorages')->flatten()->sortBy('id');
|
||||
$storages = $applicationStorages->merge($databaseStorages)->implode('updated_at');
|
||||
|
||||
$newConfigHash = $images.$domains.$images.$storages;
|
||||
$newConfigHash = $images.$domains.$images.$storages.$noindexDomains;
|
||||
$newConfigHash .= json_encode($this->environment_variables()->get('value')->makeVisible('value')->sort());
|
||||
$newConfigHash = md5($newConfigHash);
|
||||
$oldConfigHash = data_get($this, 'config_hash');
|
||||
|
||||
Reference in new issue
Block a user