Skip to content
imlostincode
ENNL
Deployment kit

astro-k8s-deployment-kit

Shared deploy setup for Astro sites. Fix it once, and every site picks it up on its next update.

UnreleasedYou're reading the docs from main. Things here can change before the next release.Back to the latest release →
examples / main

overlay-staging/middlewares.yaml

View on GitHub ↗ (opens in a new tab)
yaml
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
  name: redirect-to-https
spec:
  redirectScheme:
    scheme: https
    permanent: true
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
  name: staging-basic-auth
spec:
  basicAuth:
    secret: app-staging-basic-auth
---
# Astro staging builds are real, crawlable HTML on a public host. Basic auth
# already blocks bots, but the header costs nothing and survives someone
# temporarily disabling auth to share a preview.
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
  name: staging-noindex
spec:
  headers:
    customResponseHeaders:
      X-Robots-Tag: "noindex, nofollow"