diff --git a/manifest.yaml b/manifest.yaml index 6161ecad..df2d92da 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -43,10 +43,13 @@ 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 7bdc8874..4abfff7e 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