kivik icon indicating copy to clipboard operation
kivik copied to clipboard

Issuing db.Query call with multiple keys with queries option returns 'Bad Request: Referer header required'

Open ccrotty opened this issue 3 years ago • 2 comments

Bug Report Checklist (remove this template if submitting a feature request)

  1. Which version of Kivik are you using? Please state a version number, or master. github.com/go-kivik/couchdb/v3 v3.2.7 github.com/go-kivik/kivik/v3 v3.2.3 couchDB version 3.1

  2. Which version of Go are you using?
    go version 1.16.6

  3. What did you do? (Include your code if possible)

     db := client.DB(context.TODO(), "alarms")
    queries := []map[string]interface{}{
		{"startkey": `["540b9411-c63d-4d6b-bbd4-a808a966d51d"]`, "endkey": `["540b9411-c63d-4d6b-bbd4-a808a966d51d",{}]`},
		{"startkey": `[""]`, "endkey": `["",{}]`},
	}
​
	kOptions := kivik.Options {"queries": queries,}
	rows, err := db.Query(context.TODO(), "filterpaging", "programidfilter", kOptions)
  1. What did you expect to see? A response of fields matching the multi-key criteria

  2. What did you see instead? An error returned stating 'Bad Request: Referer header required'

ccrotty avatar Aug 03 '21 13:08 ccrotty

I'm sorry not to have responded earlier. somehow this flew under my radar. Is this still an ongoing problem?

flimzy avatar Dec 31 '21 15:12 flimzy

It may be. I changed my data storage to avoid using multiple keys.

ccrotty avatar Jan 02 '22 17:01 ccrotty

Closing this unless/until we get another report with a reproduction case.

flimzy avatar Sep 28 '23 08:09 flimzy