Skip to content

CSP reports do not appear in the dashboard #5

Open
@Matt-STN

Description

@Matt-STN

I've added the endpoint to my policy and I run it behind a nginx reverse proxy. I see in the nginx logs that the requests are forwarded to the endpoint (which I set to https://my-url:8443/log), and when I hit https://my-url:8443/dashboard I reach the dashboard. No data seems to be printed on the dashboard, though, and nothing is logged after the initialization of the endpoint.

Here is my docker compose file:

services:
  tls:
    image: nginx
    restart: unless-stopped
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf
      - ./certs:/var/certs/
    ports:
      - 4343:443
      - 8443:8443

  webhook:
    image: giuliocomi/csplogger
    volumes:
      - webhook:/home/csplogger-agent/csplogger/databases/
    ports:
      - 8443/tcp


volumes:
  webhook:

And my nginx.conf file:

events {

}

http {

  log_format  proxy_log  '[$time_local] $remote_addr - $remote_user "$host$request_uri" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"'
                      ' Proxy: "$proxy_host" "$upstream_addr"';

  access_log /dev/stdout proxy_log;

  server {
    listen 8443 ssl;
    server_name my-url;

    ssl_certificate /var/certs/webhook.cert;
    ssl_certificate_key /var/certs/webhook.key;

    location / {
      error_page 418 = @dashboard;
      proxy_pass http://webhook:8443;

      if ($request_method = GET) {
	return 418;
      }
    }

    location @dashboard {
	allow my-ip;
	deny all;

	proxy_pass http://webhook:8443;
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions