Skip to content

Commit f7bf152

Browse files
committed
Explicitly use BlackLab api v4 for now
1 parent 1b2b411 commit f7bf152

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/frontend/src/api/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ export function init(which: keyof typeof endpoints, url: string, user: User|null
4848
endpoints[which] = createEndpoint({
4949
baseURL: url.replace(/\/*$/, '/'),
5050
paramsSerializer: params => qs.stringify(params),
51-
headers
51+
headers,
52+
params: which === 'blacklab' ? {
53+
api: '4' // backward compat
54+
} : undefined,
5255
});
5356
}
5457

src/main/java/nl/inl/corpuswebsite/utils/BlackLabApi.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ public BlackLabApi(HttpServletRequest clientRequest, HttpServletResponse clientR
2727
}
2828

2929
private AuthRequest authRequest() {
30-
var req = new AuthRequest(request, response);
30+
var req = new AuthRequest(request, response)
31+
.query("api", "4"); // compat
3132

3233
readRequestParameter(request, config.get(Keys.AUTH_SOURCE_TYPE), config.get(Keys.AUTH_SOURCE_NAME))
3334
.ifPresent(auth -> setParameter(req, config.get(Keys.AUTH_TARGET_TYPE), config.get(Keys.AUTH_TARGET_NAME), auth));

0 commit comments

Comments
 (0)