Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSP reports do not appear in the dashboard #5

Open
Matt-STN opened this issue Oct 25, 2024 · 0 comments
Open

CSP reports do not appear in the dashboard #5

Matt-STN opened this issue Oct 25, 2024 · 0 comments

Comments

@Matt-STN
Copy link

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;
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant