CORS error in pi-hole docker

version: "3"
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp"
      - "8000:80/tcp"
 #     - "443:443/tcp"
    environment:
      TZ: 'xxx'
      WEBPASSWORD: 'xxx'
    volumes:
      - './etc-pihole/:/etc/pihole/'
      - './etc-dnsmasq.d/:/etc/dnsmasq.d/'
    cap_add:
      - NET_ADMIN
    restart: unless-stopped

that's my docker-compose.yml file, and then I use a nginx reverse proxy to proxy that to 192.168.2.200.

server {
        listen 80;
        server_name pi.hole;

        location / {
                proxy_pass http://localhost:8000/;
        }
}
  1. I can't access pi.hole
  2. When I try and blacklist something I get a CORS error

how can I fix these things?

Paste the entire compose file, with the nginx service as well as the pihole service.

If you are reverse proxying then you'll need to add the proper CORS headers to the nginx configuration.