Fix pgAdmin routing issues by updating environment variables and middleware headers
This commit is contained in:
@@ -219,6 +219,8 @@ services:
|
|||||||
# Trust proxy headers
|
# Trust proxy headers
|
||||||
PGADMIN_CONFIG_PROXY_X_HOST_COUNT: '1'
|
PGADMIN_CONFIG_PROXY_X_HOST_COUNT: '1'
|
||||||
PGADMIN_CONFIG_PROXY_X_PREFIX_COUNT: '1'
|
PGADMIN_CONFIG_PROXY_X_PREFIX_COUNT: '1'
|
||||||
|
# Fix routing issues
|
||||||
|
SCRIPT_NAME: '/pgadmin4'
|
||||||
volumes:
|
volumes:
|
||||||
- pgadmin_data:/var/lib/pgadmin
|
- pgadmin_data:/var/lib/pgadmin
|
||||||
labels:
|
labels:
|
||||||
@@ -226,5 +228,8 @@ services:
|
|||||||
- traefik.http.routers.pgadmin.rule=Host(`pgadmin.gate.${DOMAIN}`)
|
- traefik.http.routers.pgadmin.rule=Host(`pgadmin.gate.${DOMAIN}`)
|
||||||
- traefik.http.routers.pgadmin.entrypoints=websecure
|
- traefik.http.routers.pgadmin.entrypoints=websecure
|
||||||
- traefik.http.routers.pgadmin.tls.certresolver=le
|
- traefik.http.routers.pgadmin.tls.certresolver=le
|
||||||
- traefik.http.routers.pgadmin.middlewares=security-headers
|
|
||||||
- traefik.http.services.pgadmin.loadbalancer.server.port=80
|
- traefik.http.services.pgadmin.loadbalancer.server.port=80
|
||||||
|
# Add headers for proper proxy handling
|
||||||
|
- traefik.http.middlewares.pgadmin-headers.headers.customRequestHeaders.X-Script-Name=/pgadmin4
|
||||||
|
- traefik.http.middlewares.pgadmin-headers.headers.customRequestHeaders.X-Scheme=https
|
||||||
|
- traefik.http.routers.pgadmin.middlewares=pgadmin-headers
|
||||||
|
|||||||
Reference in New Issue
Block a user