Compare commits

...
Author SHA1 Message Date
Hemachandar 5e6fc3dded fix test 2026-02-17 20:56:59 +05:30
Hemachandar c30a5b6944 Change CNAME for functions custom domains 2026-02-17 19:23:42 +05:30
2 changed files with 3 additions and 11 deletions
+2 -10
View File
@@ -130,15 +130,7 @@ class Action extends PlatformAction
$resourceType = $rule->getAttribute('deploymentResourceType', '');
// Ensures different target based on rule's type, as configured by env variables
if ($resourceType === 'function') {
// For example: fra.appwrite.run
foreach (\explode(',', System::getEnv('_APP_DOMAIN_FUNCTIONS', '')) as $targetCNAME) {
if (empty($targetCNAME)) {
continue;
}
$targetCNAMEs[] = new Domain($targetCNAME);
}
} elseif ($resourceType === 'site') {
if ($resourceType === 'site') {
// For example: appwrite.network
foreach (\explode(',', System::getEnv('_APP_DOMAIN_SITES', '')) as $targetCNAME) {
if (empty($targetCNAME)) {
@@ -146,7 +138,7 @@ class Action extends PlatformAction
}
$targetCNAMEs[] = new Domain($targetCNAME);
}
} elseif ($ruleType === 'api') {
} elseif ($resourceType === 'function' || $ruleType === 'api') {
// For example: fra.cloud.appwrite.io
$targetCNAMEs[] = new Domain(System::getEnv('_APP_DOMAIN_TARGET_CNAME', ''));
} elseif ($ruleType === 'redirect') {
+1 -1
View File
@@ -19,7 +19,7 @@ webapp.com {
template IN CNAME {
match "^stage-function\.webapp\.com\.$"
answer "{{ .Name }} 60 IN CNAME functions.localhost."
answer "{{ .Name }} 60 IN CNAME cname.localhost."
fallthrough
}