diff --git a/ov-frontend/ingress.yml b/ov-frontend/ingress.yml index 004d4dd..aaeaad2 100644 --- a/ov-frontend/ingress.yml +++ b/ov-frontend/ingress.yml @@ -15,8 +15,3 @@ spec: name: ov-frontend port: number: 80 - - tls: - - hosts: - - ov.wgbh-mla.org - secretName: ov-frontend-tls diff --git a/ov-wag/config.yml b/ov-wag/config.yml index df627b1..957e58b 100644 --- a/ov-wag/config.yml +++ b/ov-wag/config.yml @@ -4,10 +4,6 @@ metadata: name: ov-wag-config data: DJANGO_SETTINGS_MODULE: ov_wag.settings.production - OV_DB_HOST: postgres - OV_DB_PORT: '5432' - OV_DB_USER: postgres - OV_DB_NAME: ov OV_ALLOWED_HOSTS: '*' OV_TRUSTED_ORIGINS: https://admin.ov.wgbh-mla.org,http://localhost:8000 OV_DEBUG: 'true' diff --git a/ov-wag/ingressroute.yml b/ov-wag/ingressroute.yml index b5ff9bd..de1e2d0 100644 --- a/ov-wag/ingressroute.yml +++ b/ov-wag/ingressroute.yml @@ -6,30 +6,53 @@ spec: entryPoints: - websecure routes: + # Allow only access to predefined paths - kind: Rule - match: Host(`admin.ov.wgbh-mla.org`) && PathPrefix(`/static`) || Host(`admin.ov.wgbh-mla.org`) && PathPrefix(`/admin`) + match: Host(`admin.ov.wgbh-mla.org`) && PathPrefix(`/admin`) services: - kind: Service name: ov-wag port: 80 - kind: Rule - match: Host(`admin.ov.wgbh-mla.org`) && !PathPrefix(`/admin`) && !PathPrefix(`/static`) + match: Host(`admin.ov.wgbh-mla.org`) && PathPrefix(`/static`) + services: + - kind: Service + name: ov-wag + port: 80 + - kind: Rule + match: Host(`admin.ov.wgbh-mla.org`) && PathPrefix(`/accounts`) + services: + - kind: Service + name: ov-wag + port: 80 + - kind: Rule + match: Host(`admin.ov.wgbh-mla.org`) && PathPrefix(`/search`) + services: + - kind: Service + name: ov-wag + port: 80 + - kind: Rule + match: Host(`admin.ov.wgbh-mla.org`) && PathPrefix(`/footnotes`) + services: + - kind: Service + name: ov-wag + port: 80 + + # Redirect other paths to /admin, since Wagtail serves the admin site at /admin + - kind: Rule + match: Host(`admin.ov.wgbh-mla.org`) && !PathPrefix(`/admin`) && !PathPrefix(`/static`) && !PathPrefix(`/accounts`) && !PathPrefix(`/search`) && !PathPrefix(`/footnotes`) middlewares: - name: add-admin-prefix services: - kind: Service name: ov-wag port: 80 - tls: - secretName: ov-wag-tls - domains: - - main: admin.ov.wgbh-mla.org --- -# Add prefix /admin +# Add prefix /admin to the request path apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: name: add-admin-prefix spec: addPrefix: - prefix: /admin \ No newline at end of file + prefix: /admin