reject origin test in getjunk path to catch strays
This commit is contained in:
parent
ef8b188fa9
commit
6a5f4ba621
|
@ -133,6 +133,9 @@ var flightdeck = gate.NewSerializer()
|
||||||
var signGets = true
|
var signGets = true
|
||||||
|
|
||||||
func GetJunkTimeout(userid int64, url string, timeout time.Duration) (junk.Junk, error) {
|
func GetJunkTimeout(userid int64, url string, timeout time.Duration) (junk.Junk, error) {
|
||||||
|
if rejectorigin(userid, url, false) {
|
||||||
|
return nil, fmt.Errorf("rejected origin: %s", url)
|
||||||
|
}
|
||||||
client := http.DefaultClient
|
client := http.DefaultClient
|
||||||
sign := func(req *http.Request) error {
|
sign := func(req *http.Request) error {
|
||||||
var ki *KeyInfo
|
var ki *KeyInfo
|
||||||
|
|
Loading…
Reference in New Issue