Adapt isAjax to support mimetype lists

Fixes #988
This commit is contained in:
Nikolai Prokoschenko
2021-01-12 19:37:30 +01:00
committed by Nikolai Prokoschenko
parent dd60fe4fef
commit 81bf1ef8ce
3 changed files with 19 additions and 3 deletions
+7
View File
@@ -1970,6 +1970,13 @@ func TestAjaxUnauthorizedRequest2(t *testing.T) {
testAjaxUnauthorizedRequest(t, header)
}
func TestAjaxUnauthorizedRequestAccept1(t *testing.T) {
header := make(http.Header)
header.Add("Accept", "application/json, text/plain, */*")
testAjaxUnauthorizedRequest(t, header)
}
func TestAjaxForbiddendRequest(t *testing.T) {
test, err := newAjaxRequestTest()
if err != nil {