diff --git a/manifest.yaml b/manifest.yaml index 4feac966..10b191eb 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -7,7 +7,7 @@ data: APP_ENV: "${APP_APP_ENV}" APP_KEY: "${APP_APP_KEY}" APP_DEBUG: "${APP_APP_DEBUG}" - APP_URL: "https://${APP_DOMAIN}" + APP_URL: "https://${REDIRECT}${APP_DOMAIN}" LOG_CHANNEL: "k8s" CACHE_STORE: "${APP_CACHE_STORE}" DB_HOST: "${APP_DB_HOST}" @@ -158,11 +158,14 @@ spec: - web - websecure routes: - - match: Host(`${APP_DOMAIN}`) + - match: Host(`${APP_DOMAIN}`) || Host(`www.${APP_DOMAIN}`) kind: Rule services: - name: ${CI_PROJECT_PATH_SLUG}-service port: 80 + middlewares: + - name: redirect-no-www-to-www + tls: secretName: ${CRT_TLS_NAME} --- diff --git a/production-resources.yaml b/production-resources.yaml index f940be0a..ea6f2a6e 100644 --- a/production-resources.yaml +++ b/production-resources.yaml @@ -5,6 +5,7 @@ metadata: spec: dnsNames: - $APP_DOMAIN + - www.${APP_DOMAIN} secretName: $APP_DOMAIN issuerRef: name: $APP_CERT_ISSUER