Written to derive DSN keys fromhttps://golang.org/pkg/net/http/#Request forwarded from an on prem Sentry (8.13) store endpoint /api/{projectID}/store/.
import "github.com/dgbailey/dsn"
func myFunc(r *http.Request){
//some request handler
dsn, err := dsn.FromRequest(r)
if err != nil {
//handle err
} else {
//check dsn length + other logic
}
}
go test --v
- Currently requests sent to the legacy /api/store/ will return a DSN struct with URL as empty ""
- Module will currently not handle forwarded requests to the sentry API: /api/0/
- Module does not rewrite auth headers.