bunkerweb
bunkerweb copied to clipboard
[BUG] UI throws local cookie error on all requests, even on remote domains
Using the docker-compose file seen on https://docs.bunkerweb.io/1.4/web-ui/#installation
and modifying the example.com
placeholder according to the domain (correctly) configured as an A record to a remote server throws the well-known:
ValueError: Setting 'domain' for a cookie on a server running locally (ex: localhost) is not supported by complying browsers. You should have something like: '127.0.0.1 localhost dev.localhost' on your hosts file and then point your server to run on 'dev.localhost' and also set 'domain' for 'dev.localhost'
error message in werkzeug, even though there is no localhost involved in the setup.
Just in case, trying to follow the instructions in the message results in the same error with dev.localhost
, localhost.dev
and other mock configurations too.
Hello @Silur,
Which integration do you use ? Can you share your compose or variables.env + ui.env file ?
I have the same issues, is this will fix in future release? I flowed this doc https://docs.bunkerweb.io/1.4/web-ui/#installation
Hi @Silur and @haomingz, it should be fixed with the last v1.4.3 release.
Hi @fl0ppy-d1sk , Thank you for your responsiveness. Just wanted to highlight that the issue does not seem to be resolved in v1.4.3, as I am still facing it.
And I cannot access the admin page:
Error Log:
docker-compose.yml ` version: '3'
services:
mybunker: image: bunkerity/bunkerweb:1.4.3 networks: - bw-services - bw-ui ports: - 80:8080 volumes: - bw-data:/data - bw-confs:/etc/nginx environment: - SERVER_NAME=bwadm.example.com - MULTISITE=yes - API_WHITELIST_IP=127.0.0.0/8 10.20.30.0/24 - bwadm.example.com_USE_UI=yes - bwadm.example.com_USE_REVERSE_PROXY=yes - bwadm.example.com_REVERSE_PROXY_URL=/admin/ - bwadm.example.com_REVERSE_PROXY_HOST=http://myui:7000 - bwadm.example.com_REVERSE_PROXY_HEADERS=X-Script-Name /admin - bwadm.example.com_REVERSE_PROXY_INTERCEPT_ERRORS=yes labels: - "bunkerweb.UI"
myui: image: bunkerity/bunkerweb-ui:1.4.3 depends_on: - mydocker networks: - bw-ui - bw-docker volumes: - bw-data:/data - bw-confs:/etc/nginx environment: - DOCKER_HOST=tcp://mydocker:2375 - ADMIN_USERNAME=admin - ADMIN_PASSWORD=admin - ABSOLUTE_URI=http(s)://bwadm.example.com/admin/
mydocker: image: tecnativa/docker-socket-proxy networks: - bw-docker volumes: - /var/run/docker.sock:/var/run/docker.sock:ro environment: - CONTAINERS=1
networks: bw-services: bw-ui: ipam: driver: default config: - subnet: 10.20.30.0/24 bw-docker:
volumes: bw-data: bw-confs: `
After spending sometime debugging the issue, it was resolved after removing the brackets from the ABSOLUTE_URI
Environment Variable in the myui
container in the docker-compose.yml
file.
Value Before: ABSOLUTE_URI=http(s)://bwadm.example.com/admin/
Value After: ABSOLUTE_URI=http://bwadm.example.com/admin/
After spending sometime debugging the issue, it was resolved after removing the brackets from the
ABSOLUTE_URI
Environment Variable in themyui
container in thedocker-compose.yml
file.Value Before:
ABSOLUTE_URI=http(s)://bwadm.example.com/admin/
Value After:ABSOLUTE_URI=http://bwadm.example.com/admin/
Hi, I'm sorry about that, indeed in the docs we putted http(s) so people would add the "s" or not depending on their configuration but we should added a comment about it