Commit 5566b84a authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Permite restringir acceso desde ciertos dominios

Ahora es posible definir una lista de nombres de dominio, separados por
el símbolo '|', para restringir el acceso a los servicios cuando la
cabecera 'referer' de las peticiones contiene alguno de los dominios
específicados en la lista, mediante la variable de entorno
RESTRICTED_REFERERS.
parent b1933a07
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -40,6 +40,8 @@ POSTGRES_USER=geowebcache
POSTGRES_PASS=changeme
POSTGRES_DB=gwc

RESTRICTED_REFERERS=example.com|example.org

DEV_INITIAL_MEMORY=300M
DEV_MAXIMUM_MEMORY=1G
DEV_RESOURCES_RESERVATIONS_MEMORY=1500M
+5 −0
Original line number Diff line number Diff line
@@ -80,6 +80,11 @@ x-geoserver-traefik-common-service-labels: &geoserver-traefik-common-service-lab
  traefik.http.services.geoserver.loadbalancer.healthcheck.path: ${GEOSERVER_HEALTH_PATH}
  traefik.http.services.geoserver.loadbalancer.healthcheck.headers.authorization: ${TRAEFIK_HEALTH_AUTH}

  traefik.http.routers.geoserver-noop.entrypoints: ${TRAEFIK_ENTRYPOINT}
  traefik.http.routers.geoserver-noop.rule: >-
    Host(`${GEOSERVER_SUBDOMAIN}.${PUBLIC_HOSTNAME}`) && HeadersRegexp(`referer`, `.+${RESTRICTED_REFERERS}.*`)
  traefik.http.routers.geoserver-noop.service: noop@internal

services:
  geoserver-master:
    << : *geoserver-root