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.

fix: traefik appwrite

Andras Bacsai1dc73559524a
diff --git a/apps/api/src/routes/webhooks/traefik/handlers.ts b/apps/api/src/routes/webhooks/traefik/handlers.ts
index ee5bb700af..8cb09ba243 100644
--- a/apps/api/src/routes/webhooks/traefik/handlers.ts
+++ b/apps/api/src/routes/webhooks/traefik/handlers.ts
@@ -28,7 +28,7 @@ function configureMiddleware(
if (type === 'appwrite') {
traefik.http.routers[`${id}-realtime`] = {
entrypoints: ['websecure'],
- rule: `PathPrefix(\`/v1/realtime\`)`,
+ rule: `Host(\`${nakedDomain}\`) || Host(\`www.${nakedDomain}\`) && PathPrefix(\`/v1/realtime\`)`,
service: `${`${id}-realtime`}`,
tls: {
domains: {
@@ -138,7 +138,7 @@ function configureMiddleware(
if (type === 'appwrite') {
traefik.http.routers[`${id}-realtime`] = {
entrypoints: ['web'],
- rule: `PathPrefix(\`/v1/realtime\`)`,
+ rule: `Host(\`${nakedDomain}\`) || Host(\`www.${nakedDomain}\`) && PathPrefix(\`/v1/realtime\`)`,
service: `${id}-realtime`,
middlewares: []
};