mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 04:03:49 +00:00
3d904d509e
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
23 lines
388 B
Go
23 lines
388 B
Go
package diagnostics
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
"net/http"
|
|
"os"
|
|
)
|
|
|
|
func SetupCmdLineAccess() {
|
|
http.HandleFunc("/debug/metrics/cmdline", func(w http.ResponseWriter, r *http.Request) {
|
|
w.Header().Set("Access-Control-Allow-Origin", "*")
|
|
writeCmdLine(w)
|
|
})
|
|
}
|
|
|
|
func writeCmdLine(w io.Writer) {
|
|
fmt.Fprintf(w, "SUCCESS\n")
|
|
for _, arg := range os.Args {
|
|
fmt.Fprintf(w, "%s\n", arg)
|
|
}
|
|
}
|