After looking into the code, I found in PublicAuth.php:
if (in_array('XMLHttpRequest', explode(',', $this->request->getHeader('X-Requested-With')))) {
// do not re-authenticate over ajax, use dummy auth name to prevent browser popup
http_response_code(401);
header('WWW-Authenticate','DummyBasic realm="' . $this->realm . '"');
throw new \Sabre\DAV\Exception\NotAuthenticated('Cannot authenticate over ajax calls');
}
return false;
So I commented that out to return true to see and then got username/password incorrect. I then set the password of that public link again and it then started to work… Unfortunately for me it seems I have to set the password of all my public links again.