Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

[service] fixed appwrite too many redirects error

ShadowArcanist6254cdfd5aa3
diff --git a/app/Livewire/Project/Resource/Create.php b/app/Livewire/Project/Resource/Create.php
index cdf95d2e4b..c1be98ebb8 100644
--- a/app/Livewire/Project/Resource/Create.php
+++ b/app/Livewire/Project/Resource/Create.php
@@ -102,13 +102,25 @@ class Create extends Component
}
});
}
- $service->parse(isNew: true);
+ $service->parse(isNew: true);
- return redirect()->route('project.service.configuration', [
- 'service_uuid' => $service->uuid,
- 'environment_uuid' => $environment->uuid,
- 'project_uuid' => $project->uuid,
- ]);
+ // For Appwrite services, disable strip prefix for services that handle domain requests
+ if ($oneClickServiceName === 'appwrite') {
+ $servicesToDisableStripPrefix = ['appwrite', 'appwrite-console', 'appwrite-realtime'];
+ foreach ($servicesToDisableStripPrefix as $serviceName) {
+ $appService = $service->applications()->whereName($serviceName)->first();
+ if ($appService) {
+ $appService->is_stripprefix_enabled = false;
+ $appService->save();
+ }
+ }
+ }
+
+ return redirect()->route('project.service.configuration', [
+ 'service_uuid' => $service->uuid,
+ 'environment_uuid' => $environment->uuid,
+ 'project_uuid' => $project->uuid,
+ ]);
}
}
$this->type = $type->value();