Skip to content

dgbailey/dsn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dsn

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/.

implementation

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
	}
}

run tests

go test --v

Limitations:

  1. Currently requests sent to the legacy /api/store/ will return a DSN struct with URL as empty ""
  2. Module will currently not handle forwarded requests to the sentry API: /api/0/
  3. Module does not rewrite auth headers.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages