Commit a3f95fa4 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Corrige nombre de variable y http tras proxy https

El nombre usado en la variable para permitir el acceso desde el dominio
no era correcto para las versiones actuales. Del mismo modo, ya no hace
falta asignar propiedades a nivel de Catalina.

Sin embargo, en las últimas versiones sí es necesario propagar una
cabecera de petición para indicar el protocolo desde el que está
redireccionando el proxy externo. Se indica mediante labels para
Traefik.
parent 4b37dd61
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -44,8 +44,7 @@ x-geoserver-environment: &geoserver-environment
  TOMCAT_EXTRAS:
  ROOT_WEBAPP_REDIRECT:
  GEOSERVER_NODE_OPTS: 'id:{{.Service.Name}}-{{.Task.Slot}};background:${GEOSERVER_LABEL_BACKGROUND};color:${GEOSERVER_LABEL_COLOR}'
  CATALINA_OPTS: '-DHTTP_PROXY_NAME=$${HTTP_PROXY_NAME}'
  GEOSERVER_CSRF_WHITELIST: '${GEOSERVER_SUBDOMAIN}.${PUBLIC_HOSTNAME}'
  CSRF_WHITELIST: '${GEOSERVER_SUBDOMAIN}.${PUBLIC_HOSTNAME}'
  DB_BACKEND: postgres
  HOST: postgres-gwc
  POSTGRES_PORT: 5432
@@ -93,6 +92,8 @@ services:

        traefik.http.routers.geoserver-master-admin.entrypoints: ${TRAEFIK_ENTRYPOINT}
        traefik.http.routers.geoserver-master-admin.rule: Host(`${GEOSERVER_SUBDOMAIN}.${PUBLIC_HOSTNAME}`) && (PathPrefix(`/geoserver/web`) || PathPrefix(`/geoserver/rest`) || PathPrefix(`/geoserver/j_spring_security`) || PathPrefix(`/geoserver/gwc/rest`))
        traefik.http.middlewares.add-proxy-protocol-header.headers.customrequestheaders.x-forwarded-proto: https
        traefik.http.routers.geoserver-master-admin.middlewares: add-proxy-protocol-header
        traefik.http.routers.geoserver-master-admin.service: geoserver-master

        traefik.http.routers.geoserver-master.entrypoints: ${TRAEFIK_ENTRYPOINT}