Example to reproduce the issue at pgadmin-org/pgadmin4#5507
Download this git and run docker-compose up --build -d
When opening http://localhost:8080/pgadmin4/browser/ you can see, that not all requests from the javascript are going to /pgadmin
Example to reproduce the issue at pgadmin-org/pgadmin4#5507
Download this git and run docker-compose up --build -d
When opening http://localhost:8080/pgadmin4/browser/ you can see, that not all requests from the javascript are going to /pgadmin
services: | |
nginx: | |
build: . | |
ports: | |
- 8080:80 | |
pgadmin: | |
image: dpage/pgadmin4:6.15 | |
environment: | |
PGADMIN_DEFAULT_EMAIL: "[email protected]" | |
PGADMIN_DEFAULT_PASSWORD: "secret" | |
PGADMIN_LISTEN_PORT: "5050" | |
PGADMIN_SERVER_JSON_FILE: "/data/servers.json" | |
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False" | |
PGADMIN_CONFIG_SERVER_MODE: "False" | |
SCRIPT_NAME: "/pgadmin4" | |
volumes: | |
- ./servers.json:/data/servers.json:ro | |
postgres: | |
image: postgres:13.2 | |
environment: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: mydb |
FROM nginx:1.22.1-alpine | |
COPY nginx.conf /etc/nginx/conf.d/default.conf |
server { | |
listen 80; | |
listen [::]:80; | |
server_name localhost; | |
location /pgadmin4 { | |
proxy_set_header X-Script-Name /pgadmin4; | |
proxy_set_header X-Scheme $scheme; | |
proxy_set_header Host $host; | |
proxy_pass http://pgadmin:5050; | |
proxy_redirect off; | |
} | |
} |
{ | |
"Servers": { | |
"1": { | |
"Name": "Admin", | |
"Group": "Postgres", | |
"Username": "postgres", | |
"Host": "postgres", | |
"Port": 5432, | |
"SSLMode": "prefer", | |
"MaintenanceDB": "postgres" | |
} | |
} | |
} |