# README
Violations Receiver
Content Security Policy violations receiver.
Currently it uses Elasticsearch as a storage, but other dbs could be easily implemented.
How to start
Docker
sudo docker-compose up -d
Do not forget to specify volume for the Elasticsearch data if you want to persist the data.
Development version
Only Go 1.9+ is supported.
Listen on :8080
and use 127.0.0.1:9200
as the Elastic server storage.
$: VIOR_PORT=8080 \
VIOR_ELASTIC_URL=http://127.0.0.1:9200 \
go run cmd/vior-http/main.go
# Packages
No description provided by the author
# Functions
NewElasticStorage bootstraps and initializes ElasticStorage.
# Constants
InputPath is http handle path as you specified in the report-uri.
# Structs
Config represents application configuration.
ElasticStorage is an example of the storage for CSP reports, that implements DataStorage interface.
ExtReport is an extended Report with additional metadata.
Report represents Content Security Policy violation report Link: https://w3c.github.io/webappsec-csp/2/#directive-report-uri (8.2 Sample violation report).
Request is a top struct of the CSP violation report request.
# Interfaces
DataStorage represents an interface for the actual reports storage.