Skip to content

Commit

Permalink
fix: changed default report path to /report
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhirn committed Feb 18, 2024
1 parent 5d50c4a commit 8705893
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Configuration
- `LOG_JSON` (default: true)
- `REPORTS_PORT` (default: 8080)
- `METRICS_PORT` (default: 8081)
- `REPORTS_PATH` (default: /)
- `REPORTS_PATH` (default: /report)
- `METRICS_PATH` (default: /metrics)
- `REPORTS_MAXBODYSIZE` (default: 1 MiB)
- `REPORTS_MAXJSONSIZE` (default: 5 MiB)
Expand All @@ -25,15 +25,15 @@ Save reports

mkdir reports
chown 65532:65532 reports
docker run -it --rm -v ${PWD}/reports:/tmp/reports phiag/mta-sts-exporter:latest
docker run -it --rm -p 8080:8080 -p 8081:8081 -v ${PWD}/reports:/tmp/reports phiag/mta-sts-exporter:latest

Post examples

docker run -it --rm phiag/mta-sts-exporter:latest
docker run -it --rm -p 8080:8080 -p 8081:8081 phiag/mta-sts-exporter:latest

cat examples/rfc.json | gzip | curl -X POST -v --data-binary @- localhost:8080
cat examples/google.json | gzip | curl -X POST -v --data-binary @- localhost:8080
cat examples/microsoft.json | gzip | curl -X POST -v --data-binary @- localhost:8080
cat examples/rfc.json | gzip | curl -X POST -v --data-binary @- localhost:8080/report
cat examples/google.json | gzip | curl -X POST -v --data-binary @- localhost:8080/report
cat examples/microsoft.json | gzip | curl -X POST -v --data-binary @- localhost:8080/report

curl localhost:8081/metrics
curl http://localhost:8080/.well-known/mta-sts.txt
Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func createConfig() Config {

viper.SetDefault("Log.Json", true)
viper.SetDefault("Reports.Port", 8080)
viper.SetDefault("Reports.Path", "/")
viper.SetDefault("Reports.Path", "/report")
viper.SetDefault("Reports.MaxBodySize", 1*1024*1024)
viper.SetDefault("Reports.MaxJsonSize", 5*1024*1024)
viper.SetDefault("Reports.Save", true)
Expand Down

0 comments on commit 8705893

Please sign in to comment.